netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: skb_set_dev do not unconditionally drop ref to dst
@ 2012-04-30  5:38 Frank Blaschka
  2012-04-30  5:51 ` Eric Dumazet
  0 siblings, 1 reply; 10+ messages in thread
From: Frank Blaschka @ 2012-04-30  5:38 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390

From: Frank Blaschka <frank.blaschka@de.ibm.com>

commit 8a83a00b0735190384a348156837918271034144 unconditionally
drops dst reference when skb->dev is set. This causes a regression
with VLAN and the qeth_l3 network driver. qeth_l3 can not get gw
information from the skb coming from the vlan driver. It is only
valid to drop the dst in case of different name spaces.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
 net/core/dev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1881,8 +1881,8 @@ EXPORT_SYMBOL(netif_device_attach);
 #ifdef CONFIG_NET_NS
 void skb_set_dev(struct sk_buff *skb, struct net_device *dev)
 {
-	skb_dst_drop(skb);
 	if (skb->dev && !net_eq(dev_net(skb->dev), dev_net(dev))) {
+		skb_dst_drop(skb);
 		secpath_reset(skb);
 		nf_reset(skb);
 		skb_init_secmark(skb);

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

end of thread, other threads:[~2012-05-11  3:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-30  5:38 [PATCH] net: skb_set_dev do not unconditionally drop ref to dst Frank Blaschka
2012-04-30  5:51 ` Eric Dumazet
2012-04-30  6:53   ` Frank Blaschka
2012-05-02  5:50   ` Frank Blaschka
2012-05-02  6:59     ` Eric Dumazet
2012-05-03  6:28       ` David Miller
2012-05-03 12:32         ` Arnd Bergmann
2012-05-09 10:48         ` Frank Blaschka
2012-05-11  3:06           ` David Miller
2012-05-09 15:16   ` Stephen Hemminger

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