netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* patch: tunnels not setting inputdev
@ 2004-12-31 17:16 jamal
  2004-12-31 18:02 ` Patrick McHardy
  0 siblings, 1 reply; 7+ messages in thread
From: jamal @ 2004-12-31 17:16 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Wichert Akkerman

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

Dave,

Patch attached that has tunnels setting input dev correctly. 

Incorporates what ive sent to Wichert already.

A lot of the stuff the tunnels do is very similar, so maybe wiser to
have something like tunnel_type_trans().

cheers,
jamal

[-- Attachment #2: indev-patch --]
[-- Type: text/plain, Size: 2947 bytes --]

--- 2610-bk1/net/ipv4/xfrm4_input.c	2004/12/31 17:00:25	1.1
+++ 2610-bk1/net/ipv4/xfrm4_input.c	2004/12/31 17:01:05
@@ -142,6 +142,7 @@
 			dst_release(skb->dst);
 			skb->dst = NULL;
 		}
+		skb->input_dev = skb->dev;
 		netif_rx(skb);
 		return 0;
 	} else {
--- 2610-bk1/net/ipv4/ipmr.c	2004/12/31 17:01:24	1.1
+++ 2610-bk1/net/ipv4/ipmr.c	2004/12/31 17:01:54
@@ -1461,6 +1461,7 @@
 	((struct net_device_stats*)reg_dev->priv)->rx_bytes += skb->len;
 	((struct net_device_stats*)reg_dev->priv)->rx_packets++;
 	nf_reset(skb);
+	skb->input_dev = skb->dev;
 	netif_rx(skb);
 	dev_put(reg_dev);
 	return 0;
@@ -1516,6 +1517,7 @@
 	((struct net_device_stats*)reg_dev->priv)->rx_bytes += skb->len;
 	((struct net_device_stats*)reg_dev->priv)->rx_packets++;
 	skb->dst = NULL;
+	skb->input_dev = skb->dev;
 	nf_reset(skb);
 	netif_rx(skb);
 	dev_put(reg_dev);
--- 2610-bk1/net/ipv4/ip_gre.c	2004/12/31 17:02:02	1.1
+++ 2610-bk1/net/ipv4/ip_gre.c	2004/12/31 17:03:08
@@ -655,6 +655,7 @@
 		skb->dst = NULL;
 		nf_reset(skb);
 		ipgre_ecn_decapsulate(iph, skb);
+		skb->input_dev = skb->dev;
 		netif_rx(skb);
 		read_unlock(&ipgre_lock);
 		return(0);
--- 2610-bk1/net/ipv4/ipip.c	2004/12/31 17:03:24	1.1
+++ 2610-bk1/net/ipv4/ipip.c	2004/12/31 17:03:52
@@ -497,6 +497,7 @@
 		skb->dst = NULL;
 		nf_reset(skb);
 		ipip_ecn_decapsulate(iph, skb);
+		skb->input_dev = skb->dev;
 		netif_rx(skb);
 		read_unlock(&ipip_lock);
 		return 0;
--- 2610-bk1/net/ipv6/ip6_tunnel.c	2004/12/31 17:06:12	1.1
+++ 2610-bk1/net/ipv6/ip6_tunnel.c	2004/12/31 17:07:03
@@ -547,6 +547,7 @@
 		ip6ip6_ecn_decapsulate(ipv6h, skb);
 		t->stat.rx_packets++;
 		t->stat.rx_bytes += skb->len;
+		skb->input_dev = skb->dev;
 		netif_rx(skb);
 		read_unlock(&ip6ip6_lock);
 		return 0;
--- 2610-bk1/net/ipv6/xfrm6_input.c	2004/12/31 17:07:18	1.1
+++ 2610-bk1/net/ipv6/xfrm6_input.c	2004/12/31 17:07:45
@@ -126,6 +126,7 @@
 			dst_release(skb->dst);
 			skb->dst = NULL;
 		}
+		skb->input_dev = skb->dev;
 		netif_rx(skb);
 		return -1;
 	} else {
--- a/net/ipv4/ip_output.c	2004/12/31 14:26:08	1.1
+++ b/net/ipv4/ip_output.c	2004/12/31 14:27:53
@@ -111,6 +111,7 @@
 #ifdef CONFIG_NETFILTER_DEBUG
 	nf_debug_ip_loopback_xmit(newskb);
 #endif
+	newskb->input_dev = newskb->dev;
 	netif_rx(newskb);
 	return 0;
 }
--- a/net/ipv6/ip6_output.c	2004-12-24 16:33:51.000000000 -0500
+++ b/net/ipv6/ip6_output.c	2004-12-31 10:29:47.505392096 -0500
@@ -102,7 +102,7 @@
 	newskb->pkt_type = PACKET_LOOPBACK;
 	newskb->ip_summed = CHECKSUM_UNNECESSARY;
 	BUG_TRAP(newskb->dst);
-
+	newskb->input_dev = newskb->dev;
 	netif_rx(newskb);
 	return 0;
 }
--- a/net/ipv6/sit.c	2004/12/31 11:03:32	1.1
+++ b/net/ipv6/sit.c	2004/12/31 11:06:50
@@ -385,7 +385,7 @@
 		skb->pkt_type = PACKET_HOST;
 		tunnel->stat.rx_packets++;
 		tunnel->stat.rx_bytes += skb->len;
-		skb->dev = tunnel->dev;
+		skb->input_dev = skb->dev = tunnel->dev;
 		dst_release(skb->dst);
 		skb->dst = NULL;
 		nf_reset(skb);

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-01-03 14:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-31 17:16 patch: tunnels not setting inputdev jamal
2004-12-31 18:02 ` Patrick McHardy
2004-12-31 20:11   ` jamal
2005-01-01 16:10     ` Patrick McHardy
2005-01-01 23:33       ` jamal
2005-01-02  0:24         ` Patrick McHardy
2005-01-03 14:46           ` jamal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).