netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net/core] dev_forward_skb() should clear skb_iif
@ 2012-03-27 16:29 Benjamin LaHaise
  2012-03-27 21:37 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin LaHaise @ 2012-03-27 16:29 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

While investigating another bug, I found that the code on the incoming path
in __netif_receive_skb will only set skb->skb_iif if it is already 0.  When
dev_forward_skb() is used in the case of interfaces like veth, skb_iif may
already have been set.  Making dev_forward_skb() cause the packet to look
more like a newly received packet would seem to the the correct behaviour
here, as otherwise the wrong incoming interface can be reported for such a
packet.
---
 net/core/dev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 0090809..8751f6a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1597,6 +1597,7 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
 		kfree_skb(skb);
 		return NET_RX_DROP;
 	}
+	skb->skb_iif = 0;
 	skb_set_dev(skb, dev);
 	skb->tstamp.tv64 = 0;
 	skb->pkt_type = PACKET_HOST;
-- 
1.7.4.1

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

* Re: [PATCH net/core] dev_forward_skb() should clear skb_iif
  2012-03-27 16:29 [PATCH net/core] dev_forward_skb() should clear skb_iif Benjamin LaHaise
@ 2012-03-27 21:37 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-03-27 21:37 UTC (permalink / raw)
  To: bcrl; +Cc: netdev

From: Benjamin LaHaise <bcrl@kvack.org>
Date: Tue, 27 Mar 2012 12:29:20 -0400

> While investigating another bug, I found that the code on the incoming path
> in __netif_receive_skb will only set skb->skb_iif if it is already 0.  When
> dev_forward_skb() is used in the case of interfaces like veth, skb_iif may
> already have been set.  Making dev_forward_skb() cause the packet to look
> more like a newly received packet would seem to the the correct behaviour
> here, as otherwise the wrong incoming interface can be reported for such a
> packet.

Same problems as your ipv4 multicast patch, I'm not applying this.

You must learn how to properly submit your changes, otherwise I
guarentee all of your work will hit the bit bucket.

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

end of thread, other threads:[~2012-03-27 21:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-27 16:29 [PATCH net/core] dev_forward_skb() should clear skb_iif Benjamin LaHaise
2012-03-27 21:37 ` David Miller

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).