udp6_lib_lookup1(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so bestie, welcome to the Kernel API Manual page for udp6_lib_lookup1(9) β€” section 9, kernel-api energy, and we are so here for it. The name is literally Simplified lookup using primary hash (destination port). Slay. πŸ’…

✨ SYNOPSIS ✨

struct sock * udp6_lib_lookup1 (const struct net *net , const struct
in6_addr *saddr , __be16 sport , const struct in6_addr *daddr , unsigned
int hnum , int dif , int sdif , const struct udp_table *udptable );

πŸ’… ARGUMENTS πŸ’…

  • net β€” the Network namespace, aka the little world this lookup lives in 🌍
  • saddr β€” Source address, network order β€” yes, network order, don't play yourself 🫢
  • sport β€” Source port, network order β€” same energy, different field ✨
  • daddr β€” Destination address, network order β€” where it's headed, bestie 🎯
  • hnum β€” Destination port, host order β€” host order this time, okay?? πŸ’…
  • dif β€” Destination interface index β€” the interface index, iconic πŸ”₯
  • sdif β€” Destination bridge port index, if relevant β€” only if relevant, no pressure πŸ¦‹
  • udptable β€” Set of UDP hash tables β€” the whole UDP hash-table set, periodt πŸ‘‘

🌸 DESCRIPTION 🌸

Okay so this is the simplified lookup β€” the fallback bestie 😭. You use it if no sockets are found due to a potential race between (receive) address change, and lookup happening before the rehash operation. Like, that tiny race window is the entire reason this function exists, and we respect it.

When it's scoring result sockets, it straight-up ignores SO_REUSEPORT groups β€” because if we have one, we don't need the fallback at all. No cap. πŸ’€

Called under rcu_read_lock. That's the rule, bestie. πŸ”’

🌈 RETURN 🌈

It returns the socket with highest matching score if any, and NULL if none. That's the whole vibe check: socket if it wins, NULL if it doesn't. ⭐

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’– okay that's the page! Source/version vibes: ./net/ipv6, dated October 2026, and yes bestie, it's the Kernel API Manual page for udp6_lib_lookup1(9). Mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from