Skip to content
Commit c0b8da1e authored by YOSHIFUJI Hideaki/吉藤英明's avatar YOSHIFUJI Hideaki/吉藤英明 Committed by David S. Miller
Browse files

ipv6: Fix finding best source address in ipv6_dev_get_saddr().

Commit 9131f3de ("ipv6: Do not iterate over all interfaces when
finding source address on specific interface.") did not properly
update best source address available.  Plus, it introduced
possible NULL pointer dereference.

Bug was reported by Erik Kline <ek@google.com>.
Based on patch proposed by Hajime Tazaki <thehajime@gmail.com>.

Fixes: 9131f3de

 ("ipv6: Do not
	iterate over all interfaces when finding source address
	on specific interface.")
Signed-off-by: default avatarYOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux.com>
Acked-by: default avatarHajime Tazaki <thehajime@gmail.com>
Acked-by: default avatarErik Kline <ek@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9243b25b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment