netfilter: bridge-netfilter: fix refragmenting IP traffic encapsulated in PPPoE traffic
The MTU for IP traffic encapsulated inside PPPoE traffic is smaller than the MTU of the Ethernet device (1500). Connection tracking gathers all IP packets and sometimes will refragment them in ip_fragment(). We then need to subtract the length of the encapsulating header from the mtu used in ip_fragment(). The check in br_nf_dev_queue_xmit() which determines if ip_fragment() has to be called is also updated for the PPPoE-encapsulated packets. nf_bridge_copy_header() is also updated to make sure the PPPoE data length field has the correct value. Signed-off-by: Bart De Schuymer <bdschuym@pandora.be> Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:

committed by
Patrick McHardy

parent
6291055465
commit
6c79bf0f24
@@ -469,6 +469,10 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
|
||||
|
||||
hlen = iph->ihl * 4;
|
||||
mtu = dst_mtu(&rt->u.dst) - hlen; /* Size of data space */
|
||||
#ifdef CONFIG_BRIDGE_NETFILTER
|
||||
if (skb->nf_bridge)
|
||||
mtu -= nf_bridge_mtu_reduction(skb);
|
||||
#endif
|
||||
IPCB(skb)->flags |= IPSKB_FRAG_COMPLETE;
|
||||
|
||||
/* When frag_list is given, use it. First, check its validity:
|
||||
|
Reference in New Issue
Block a user