From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: "Templin, Fred L" <Fred.L.Templin@boeing.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH] net: clear local_df when passing skb between namespaces
Date: Thu, 5 Dec 2013 23:29:19 +0100 [thread overview]
Message-ID: <20131205222919.GD21745@order.stressinduktion.org> (raw)
In-Reply-To: <20131205201856.GC21745@order.stressinduktion.org>
We must clear local_df when passing the skb between namespaces as the
packet is not local to the new namespace any more and thus may not get
fragmented by local rules. Fred Templin noticed that other namespaces
do fragment IPv6 packets while forwarding. Instead they should have send
back a PTB.
The same problem should be present when forwarding DF-IPv4 packets
between namespaces.
Reported-by: Templin, Fred L <Fred.L.Templin@boeing.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
net/core/skbuff.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 2718fed..06e72d3 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3584,6 +3584,7 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet)
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.8.3.1
next prev parent reply other threads:[~2013-12-05 22:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-05 19:39 Possible IPv6 fragmentation/pmtud bug Templin, Fred L
2013-12-05 20:13 ` Templin, Fred L
2013-12-05 20:18 ` Hannes Frederic Sowa
2013-12-05 22:29 ` Hannes Frederic Sowa [this message]
2013-12-05 22:52 ` [PATCH] net: clear local_df when passing skb between namespaces Templin, Fred L
2013-12-06 4:43 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131205222919.GD21745@order.stressinduktion.org \
--to=hannes@stressinduktion.org \
--cc=Fred.L.Templin@boeing.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox