nf_tproxy_handle_time_wait6(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ nf_tproxy_handle_time_wait6(9) β€” Kernel API Manual, bestie edition πŸ¦‹

🌸 NAME 🌸

nf_tproxy_handle_time_wait6 β€” handle IPv6 TCP TIME_WAIT reopen redirections. Periodt, that's the name and it's literally giving kernel IPv6 TCP TIME_WAIT reopen redirection realness. πŸ’…

✨ SYNOPSIS ✨

Okay so the signature is exactly this:

struct sock * nf_tproxy_handle_time_wait6 (struct sk_buff *skb , int
       tproto , int thoff , struct net *net , const struct in6_addr *laddr ,
       const __be16 lport , struct sock *sk );

No cap, copy it exactly. 🫢

πŸŽ€ ARGUMENTS πŸŽ€

Here's the cast, bestie:

  • skb β€” The skb being processed. Main character packet energy.
  • tproto β€” Transport protocol. Yep, that one. ✨
  • thoff β€” Transport protocol header offset.
  • net β€” Network namespace. The neighborhood, basically.
  • laddr β€” IPv6 address to redirect to.
  • lport β€” TCP port to redirect to or zero.
  • sk β€” The TIME_WAIT TCP socket found by the lookup. iykyk

πŸ’– DESCRIPTION πŸ’–

Okay so the whole plot: we have to handle SYN packets arriving to TIME_WAIT sockets differently. Instead of reopening the connection, we should rather redirect the new connection to the proxy if there's a listener socket present. That's the lore. πŸ”₯

And important: nf_tproxy_handle_time_wait6 consumes the socket reference passed in. So yeah, it eats that ref. 🍴

⚠️ Bestie warning: the socket reference passed in gets consumed. Don't sleep on that detail. 😭

⭐ RETURN ⭐

What you get back:

  • the listener socket if there's one,
  • the TIME_WAIT socket if no such listener is found,
  • or NULL if the TCP header is incomplete.

That's the return vibe check, fr fr. πŸ’€βœ¨

🌈 SEE ALSO 🌈

Go peep those, ngl. πŸ‘‘


Source/version: ./include/net/netfilter Β· Date: October 2026 Β· Page: nf_tproxy_handle_time_wait6(9) β€” mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from