netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: Clear local_df only if crossing namespace.
@ 2014-02-07 22:12 Pravin
  2014-02-07 22:28 ` Hannes Frederic Sowa
  0 siblings, 1 reply; 11+ messages in thread
From: Pravin @ 2014-02-07 22:12 UTC (permalink / raw)
  To: davem; +Cc: netdev, Pravin, Templin, Fred L, Hannes Frederic Sowa

Commit 239c78db9c41a8 (net: clear local_df when passing skb between
namespaces) clears local_df unconditionally.  But upper layer should
be able request local fragmentation within a namespace.  Currently
OVS sets local_df for tunnel packets and then skb_scrub_packe()
resets it which is not correct.

Therefore following patch resets local_df only packet is crossing
namespace.

CC: Templin, Fred L <Fred.L.Templin@boeing.com>
CC: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
---
 net/core/skbuff.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 5976ef0..4ba262f 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3905,12 +3905,13 @@ EXPORT_SYMBOL(skb_try_coalesce);
  */
 void skb_scrub_packet(struct sk_buff *skb, bool xnet)
 {
-	if (xnet)
+	if (xnet) {
 		skb_orphan(skb);
+		skb->local_df = 0;
+	}
 	skb->tstamp.tv64 = 0;
 	skb->pkt_type = PACKET_HOST;
 	skb->skb_iif = 0;
-	skb->local_df = 0;
 	skb_dst_drop(skb);
 	skb->mark = 0;
 	secpath_reset(skb);
-- 
1.7.9.5

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

end of thread, other threads:[~2014-02-13  8:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-07 22:12 [PATCH net] net: Clear local_df only if crossing namespace Pravin
2014-02-07 22:28 ` Hannes Frederic Sowa
2014-02-07 22:49   ` Pravin Shelar
2014-02-08  0:58     ` Hannes Frederic Sowa
2014-02-10 21:00       ` Pravin Shelar
2014-02-11  2:11         ` Hannes Frederic Sowa
2014-02-12  4:26           ` Pravin Shelar
2014-02-12  9:32             ` Nicolas Dichtel
2014-02-12 17:05               ` Pravin Shelar
2014-02-13  8:50                 ` Nicolas Dichtel
2014-02-12 23:35               ` Hannes Frederic Sowa

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