diff options
author | David Ahern <dsa@cumulusnetworks.com> | 2016-11-03 16:17:26 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-10 10:26:28 +0200 |
commit | 12003a72a164689011b7f22b1b6388c8509a80e1 (patch) | |
tree | 210a4fefd4ad4d80c8a5b2a1cda1fc381bba39e2 /net/ipv6 | |
parent | 720ef97e3c7fa7c7fa2333fb1d1503bc2920a3ef (diff) |
net: icmp6_send should use dst dev to determine L3 domain
commit 5d41ce29e3b91ef305f88d23f72b3359de329cec upstream.
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: ca254490c8dfd ("net: Add VRF support to IPv6 stack")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/icmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index e5bd9b38abf2..d21e81cd6120 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -446,7 +446,7 @@ static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info) if (__ipv6_addr_needs_scope_id(addr_type)) iif = skb->dev->ifindex; 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 |