udp6_lib_lookup1(9)
π 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 π¦
- Kernel file
./net/ipv6/udp.cβ and go peek atudp6_hwcsum_outgoing(9)too, iykyk ππ
π 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
- 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