BACKPORT: net: release reference to inet6_dev pointer

commit 5cb249686e67dbef3ffe53887fa725eefc5a7144 upstream.

addrconf_prefix_rcv returned early without releasing the inet6_dev
pointer when the PIO lifetime is less than accept_ra_min_lft.

Change-Id: Ic633a1ea28c96f712dce8875f24227ce02ab86b0
Fixes: 5027d54a9c30 ("net: change accept_ra_min_rtr_lft to affect all RA lifetimes")
Cc: Maciej Żenczykowski <[email protected]>
Cc: Lorenzo Colitti <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Simon Horman <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Maciej Żenczykowski <[email protected]>
Signed-off-by: Patrick Rohr <[email protected]>
Reviewed-by: Leon Romanovsky <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Patrick Rohr 2023-10-13 14:44:14 -07:00 • committed by Nolen Johnson
commit f8a55ca468

View file

@ -2752,7 +2752,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao)
}
if (valid_lft != 0 && valid_lft < in6_dev->cnf.accept_ra_min_lft)
return;
goto put;
/*
* Two things going on here: