]> git.ipfire.org Git - thirdparty/bind9.git/commit
Disable the Path MTU Discover on UDP Sockets
authorOndřej Surý <ondrej@sury.org>
Wed, 28 Jul 2021 13:55:46 +0000 (15:55 +0200)
committerMichał Kępień <michal@isc.org>
Thu, 19 Aug 2021 05:12:33 +0000 (07:12 +0200)
commit87d5c8ab7c7538c70e7aac23fefcb2e5f6d3964a
treeb644a1f4174c240b17d00e650ccf50b1f547417a
parent69243a0f5671f5c4f89106d2fcb6a5be0ce17ae0
Disable the Path MTU Discover on UDP Sockets

Instead of disabling the fragmentation on the UDP sockets, we now
disable the Path MTU Discovery by setting IP(V6)_MTU_DISCOVER socket
option to IP_PMTUDISC_OMIT on Linux and disabling IP(V6)_DONTFRAG socket
option on FreeBSD.  This option sets DF=0 in the IP header and also
ignores the Path MTU Discovery.

As additional mitigation on Linux, we recommend setting
net.ipv4.ip_no_pmtu_disc to Mode 3:

    Mode 3 is a hardend pmtu discover mode. The kernel will only accept
    fragmentation-needed errors if the underlying protocol can verify
    them besides a plain socket lookup. Current protocols for which pmtu
    events will be honored are TCP, SCTP and DCCP as they verify
    e.g. the sequence number or the association. This mode should not be
    enabled globally but is only intended to secure e.g. name servers in
    namespaces where TCP path mtu must still work but path MTU
    information of other protocols should be discarded. If enabled
    globally this mode could break other protocols.
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/udp.c
lib/isc/socket.c