浏览代码

net: clear local_df when passing skb between namespaces

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Frederic Sowa 12 年之前
父节点
当前提交
239c78db9c
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      net/core/skbuff.c

+ 1 - 0
net/core/skbuff.c

@@ -3584,6 +3584,7 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet)
 	skb->tstamp.tv64 = 0;
 	skb->tstamp.tv64 = 0;
 	skb->pkt_type = PACKET_HOST;
 	skb->pkt_type = PACKET_HOST;
 	skb->skb_iif = 0;
 	skb->skb_iif = 0;
+	skb->local_df = 0;
 	skb_dst_drop(skb);
 	skb_dst_drop(skb);
 	skb->mark = 0;
 	skb->mark = 0;
 	secpath_reset(skb);
 	secpath_reset(skb);