aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/lorder/Makefile.depend
diff options
context:
space:
mode:
authorR. Christian McDonald <rcm@FreeBSD.org>2026-11-25 12:58:48 +0000
committerR. Christian McDonald <rcm@FreeBSD.org>2026-11-25 13:46:33 +0000
commit655407eeea5bf6ee1db75ee20496d3c57efcbf10 (patch)
tree66fa301715a139e378aed98ffb1015b920c1a5b5 /usr.bin/lorder/Makefile.depend
parent5775048272dfabf614c1107058c226165ccfe366 (diff)
netipsec: Apply the rest of a bundle when the PMTU check finds no SAHEADmain
ipsec{4,6}_check_pmtu() looks up the SA of the last request of a policy to learn the path MTU. When that request is at level "use" and no SA is found for it, the lookup returns EJUSTRETURN, and ipsec4_common_output1() and ipsec6_common_output() took that to mean that the packet needs no IPsec processing. That holds for a policy with one request. For a bundle it also skipped the requests before the last one, for example the ESP tunnel request of "esp/tunnel/A-B/require ah/transport//use", and the packet was sent without their transforms. The lookup finds no SA when none is installed, and also when the last request is a transport request that follows a tunnel request, as in the example. The lookup fills in the empty addresses of a transport request from the packet as it is before any transform, while the transform applies the request after the tunnel request, to the outer header, and the SA is installed for the addresses of the tunnel. So the bundle above was sent without its transforms even with an AH SA from A to B in place. For IPv4 the check runs when net.inet.ipsec.dfbit is 1, or is above 1 and the packet has DF set, and not with the default of 0. For IPv6 it runs for forwarded packets and not for locally originated ones. Return 0 from the check in this case and keep the reference to the SP, so that ipsec{4,6}_process_packet() goes through the requests as it does when the check does not run. It returns EJUSTRETURN itself when no request applies, and such a packet is still sent without IPsec processing. When the check finds no SA it does not compare the packet with the path MTU. With net.inet.ipsec.dfbit set the outer IPv4 header carries DF, so a packet that is too big once encapsulated is dropped without an ICMP needfrag reaching its sender. ip6_output() fragments an outer IPv6 packet instead. Reviewed by: kib Fixes: 6b66194bcb7e ("ipsec: Check PMTU before sending...") Fixes: 9dfc8606eb80 ("ipsec: Add support for PMTUD...") MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D61645
Diffstat (limited to 'usr.bin/lorder/Makefile.depend')
0 files changed, 0 insertions, 0 deletions