]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipv4: fix path MTU discovery with connection tracking
authorPatrick McHardy <kaber@trash.net>
Sun, 26 Aug 2012 17:13:55 +0000 (19:13 +0200)
committerPatrick McHardy <kaber@trash.net>
Sun, 26 Aug 2012 17:13:55 +0000 (19:13 +0200)
commit5f2d04f1f9b52604fca6ee08a77972c0df67e082
treef4caa0aa602f6044f1fc20c6dfa89527183803d1
parent0fa7fa98dbcc2789409ed24e885485e645803d7f
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: Patrick McHardy <kaber@trash.net>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: David S. Miller <davem@davemloft.net>
include/net/inet_frag.h
include/net/ip.h
net/ipv4/ip_fragment.c
net/ipv4/ip_output.c