[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1391811158-11433-1-git-send-email-pshelar@nicira.com>
Date: Fri, 7 Feb 2014 14:12:38 -0800
From: Pravin <pshelar@...ira.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, Pravin <pshelar@...ira.com>,
"Templin, Fred L" <Fred.L.Templin@...ing.com>,
Hannes Frederic Sowa <hannes@...essinduktion.org>
Subject: [PATCH net] net: Clear local_df only if crossing namespace.
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@...ing.com>
CC: Hannes Frederic Sowa <hannes@...essinduktion.org>
Signed-off-by: Pravin B Shelar <pshelar@...ira.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists