mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-09 16:24:45 +00:00
Two bugs prevented Path MTU Discovery from working across heterogeneous links (e.g., ethernet→UDP boundary): 1. ICMPv6 Packet Too Big wrote the MTU as u16 into a 32-bit field (RFC 4443 §3.2), causing the kernel to read an inflated value. Fixed by changing build_packet_too_big() to use u32 and writing all 4 bytes. 2. handle_tun_outbound() only checked the local transport MTU, not the per-destination PathMtuState updated by MtuExceeded signals. Added a PathMtuState check after session lookup so subsequent oversized packets generate ICMPv6 PTB on TUN instead of being forwarded and dropped at the bottleneck hop. Added integration test exercising the full PMTUD loop across a 3-node chain with heterogeneous MTUs: oversized packet → forwarding failure → MtuExceeded signal → PathMtuState update → ICMPv6 PTB on TUN.