summaryrefslogtreecommitdiffstats
path: root/net/key
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2022-05-18 23:05:48 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2022-05-25 11:41:26 +0200
commit6821ad8770340825f17962cf5ef64ebaffee7fd7 (patch)
tree6d2198e62801f34ff95523ab940c1eeb4087acb5 /net/key
parentRevert "net: af_key: add check for pfkey_broadcast in function pfkey_process" (diff)
downloadlinux-6821ad8770340825f17962cf5ef64ebaffee7fd7.tar.xz
linux-6821ad8770340825f17962cf5ef64ebaffee7fd7.zip
xfrm: do not set IPv4 DF flag when encapsulating IPv6 frames <= 1280 bytes.
One may want to have DF set on large packets to support discovering path mtu and limiting the size of generated packets (hence not setting the XFRM_STATE_NOPMTUDISC tunnel flag), while still supporting networks that are incapable of carrying even minimal sized IPv6 frames (post encapsulation). Having IPv4 Don't Frag bit set on encapsulated IPv6 frames that are not larger than the minimum IPv6 mtu of 1280 isn't useful, because the resulting ICMP Fragmentation Required error isn't actionable (even assuming you receive it) because IPv6 will not drop it's path mtu below 1280 anyway. While the IPv4 stack could prefrag the packets post encap, this requires the ICMP error to be successfully delivered and causes a loss of the original IPv6 frame (thus requiring a retransmit and latency hit). Luckily with IPv4 if we simply don't set the DF flag, we'll just make further fragmenting the packets some other router's problems. We'll still learn the correct IPv4 path mtu through encapsulation of larger IPv6 frames. I'm still not convinced this patch is entirely sufficient to make everything happy... but I don't see how it could possibly make things worse. See also recent: 4ff2980b6bd2 'xfrm: fix tunnel model fragmentation behavior' and friends Cc: Lorenzo Colitti <lorenzo@google.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Lina Wang <lina.wang@mediatek.com> Cc: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Maciej Zenczykowski <maze@google.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/key')
0 files changed, 0 insertions, 0 deletions