On 04/20/2018 02:58 PM, Ahmed Abdelsalam wrote:
In case of seg6 in encap mode, seg6_do_srh_encap() calls set_tun_src()
in order to set the src addr of outer IPv6 header.

The net_device is required for set_tun_src(). However calling ip6_dst_idev()
on dst_entry in case of IPv4 traffic results on the following bug.

Using just dst->dev should fix this BUG.


Good catch, thanks for spotting this. If you actually tested your fix with IPv4 and IPv6 traffic, you should mention it in the commit message. Your current formulation suggests that you just guessed a fix without testing.


Fixes: 8936ef7604c11 ipv6: sr: fix NULL pointer dereference when setting encap 
source address
Signed-off-by: Ahmed Abdelsalam<amsala...@gmail.com>

Acked-by: David Lebrun <dleb...@google.com>

Reply via email to