Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5f2d04f1 authored by Patrick McHardy's avatar Patrick McHardy
Browse files

ipv4: fix path MTU discovery with connection tracking



IPv4 conntrack defragments incoming packet at the PRE_ROUTING hook and
(in case of forwarded packets) refragments them at POST_ROUTING
independent of the IP_DF flag. Refragmentation uses the dst_mtu() of
the local route without caring about the original fragment sizes,
thereby breaking PMTUD.

This patch fixes this by keeping track of the largest received fragment
with IP_DF set and generates an ICMP fragmentation required error during
refragmentation if that size exceeds the MTU.

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0fa7fa98
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment