Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1525926 > unrolled thread

[PATCH 4.8 16/49] net: icmp6_send should use dst dev to determine L3 domain

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-11-19 10:30 +0100
Last post2016-11-19 10:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.8 16/49] net: icmp6_send should use dst dev to determine L3 domain Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-19 10:30 +0100

#1525926 — [PATCH 4.8 16/49] net: icmp6_send should use dst dev to determine L3 domain

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-19 10:30 +0100
Subject[PATCH 4.8 16/49] net: icmp6_send should use dst dev to determine L3 domain
Message-ID<sFa8c-33e-101@gated-at.bofh.it>
4.8-stable review patch.  If anyone has any objections, please let me know.

------------------

From: David Ahern <dsa@cumulusnetworks.com>


[ Upstream commit 5d41ce29e3b91ef305f88d23f72b3359de329cec ]

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>
---
 net/ipv6/icmp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -448,7 +448,7 @@ static void icmp6_send(struct sk_buff *s
 	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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web