skb_tunnel_check_pmtu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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