skb_tunnel_check_pmtu(9)
π skb_tunnel_check_pmtu(9) β from the Kernel API Manual, bestie
Okay so picture this: you're deep in the kernel, in a .9 man page, and the vibes are extremely networking. This is skb_tunnel_check_pmtu(9), and no cap, it does exactly what it says on the tin: it checks, it updates PMTU, and it triggers an ICMP reply when needed. Main character energy from a function that's literally four arguments long. Obsessed. π
β¨ NAME β¨
skb_tunnel_check_pmtu β Check, update PMTU and trigger ICMP reply as needed π
π¦ SYNOPSIS π¦
int skb_tunnel_check_pmtu (struct sk_buff *skb , struct dst_entry
*encap_dst , int headroom , bool reply );
That's the whole signature, character for character β don't you dare try to "clean up" that line break, it's canon. π
πΈ ARGUMENTS πΈ
skbβ the buffer being sent by encapsulation, bestie. Heads up: L2 headers expected. πencap_dstβ destination for tunnel encapsulation (that's the outer IP, iykyk).headroomβ encapsulation header size, in bytes. Just a number, but an important number. π’replyβ if true, it builds a matching ICMP or ICMPv6 message as a result. Say less. β¨
π§ DESCRIPTION π§
Okay so here's the lore. L2 tunnel implementations that can carry IP and can be directly bridged (currently that's the UDP tunnels, periodt) can't always rely on IP forwarding paths to handle PMTU discovery. Not every tunnel gets to just vibe off the forwarding path, you know? π
In the bridged case, ICMP or ICMPv6 messages need to be built based on payload, and then sent back by the encapsulation itself. Yes, the encapsulation does it herself. Independent queen behavior. π
For routable interfaces though? Way simpler β we just need to update the PMTU for the destination. That's it. That's the whole task. Slay. π
π₯ RETURN π₯
0β ICMP error not needed. We're chilling. π- length β it got built, so you get the length. π
- negative value β something went wrong. π Not the vibe.
π SEE ALSO π
Kernel file ./net/ipv4/ip_tunnel_core.c β and yes, she has friends:
iptunnel_pmtud_build_icmp(9)iptunnel_pmtud_check_icmp(9)iptunnel_pmtud_build_icmpv6(9)iptunnel_pmtud_check_icmpv6(9)
Go read them. Fr fr. π
π«Ά Quick reminder bestie: the return value is 0 for "no ICMP error needed", a length if one was built, and a negative value on error. Read your returns, don't get caught slipping. π
That's the whole page, and honestly? Ate. π This cutie lives over in ./net/ipv4, dated October 2026, in the Kernel API Manual β and it's signed off as skb_tunnel_check_pmtu(9), as all iconic .9 pages are. πβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms