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


Groups > linux.kernel > #1525902 > unrolled thread

[PATCH 4.8 19/49] net: icmp_route_lookup should use rt 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 19/49] net: icmp_route_lookup should use rt dev to determine L3 domain Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-19 10:30 +0100

#1525902 — [PATCH 4.8 19/49] net: icmp_route_lookup should use rt dev to determine L3 domain

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-19 10:30 +0100
Subject[PATCH 4.8 19/49] net: icmp_route_lookup should use rt dev to determine L3 domain
Message-ID<sFa8b-33e-65@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 9d1a6c4ea43e48c7880c85971c17939b56832d8a ]

icmp_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 an rt.
Update icmp_route_lookup to use the rt on the skb to determine L3
domain.

Fixes: 613d09b30f8b ("net: Use VRF device index for lookups on TX")
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/ipv4/icmp.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -477,7 +477,7 @@ static struct rtable *icmp_route_lookup(
 	fl4->flowi4_proto = IPPROTO_ICMP;
 	fl4->fl4_icmp_type = type;
 	fl4->fl4_icmp_code = code;
-	fl4->flowi4_oif = l3mdev_master_ifindex(skb_in->dev);
+	fl4->flowi4_oif = l3mdev_master_ifindex(skb_dst(skb_in)->dev);
 
 	security_skb_classify_flow(skb_in, flowi4_to_flowi(fl4));
 	rt = __ip_route_output_key_hash(net, fl4,
@@ -502,7 +502,7 @@ static struct rtable *icmp_route_lookup(
 	if (err)
 		goto relookup_failed;
 
-	if (inet_addr_type_dev_table(net, skb_in->dev,
+	if (inet_addr_type_dev_table(net, skb_dst(skb_in)->dev,
 				     fl4_dec.saddr) == RTN_LOCAL) {
 		rt2 = __ip_route_output_key(net, &fl4_dec);
 		if (IS_ERR(rt2))

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web