Commit 5d41ce29 authored by David Ahern's avatar David Ahern Committed by David S. Miller

net: icmp6_send should use dst dev to determine L3 domain

icmp6_send is called in response to some event. The skb may not have
the device set (skb->dev is NULL), but it is expected to have a dst set.
Update icmp6_send to use the dst on the skb to determine L3 domain.

Fixes: ca254490 ("net: Add VRF support to IPv6 stack")
Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 20b2b24f
...@@ -448,7 +448,7 @@ static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info, ...@@ -448,7 +448,7 @@ static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,
if (__ipv6_addr_needs_scope_id(addr_type)) if (__ipv6_addr_needs_scope_id(addr_type))
iif = skb->dev->ifindex; iif = skb->dev->ifindex;
else else
iif = l3mdev_master_ifindex(skb->dev); iif = l3mdev_master_ifindex(skb_dst(skb)->dev);
/* /*
* Must not send error if the source does not uniquely * Must not send error if the source does not uniquely
......
Markdown is supported
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