netlbl_cache_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– netlbl_cache_add(9) πŸ’–

okay so this is netlbl_cache_add(9) from the Kernel API Manual β€” yes bestie, we're in kernel-doc territory and it's giving very "I read the source for fun" energy 🧚✨


✨ NAME ✨

netlbl_cache_add β€” add an entry to a NetLabel protocol cache πŸŽ€


🌸 SYNOPSIS 🌸

int netlbl_cache_add (const struct sk_buff *skb , u16 family ,
                      const struct netlbl_lsm_secattr *secattr );

like literally that's the whole signature, no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • skb β€” the packet πŸ“¦ (the actual sk_buff we're talking about here)
  • family β€” the family 🏠 (that's the address family arg, exactly as named)
  • secattr β€” the packet's security attributes πŸ” (a const struct netlbl_lsm_secattr *)

πŸ‘‘ DESCRIPTION πŸ‘‘

so what this does πŸ‘ is it takes the LSM security attributes for the given packet and adds them to the underlying NetLabel protocol's label mapping cache. that's it, that's the whole vibe 🫢

return value check, bestie, do not skip:

  • returns zero on success ⭐
  • returns negative values on error πŸ’€
ngl, always check the return. zero is the slay outcome, negatives are the "we have a problem" outcome 😭

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./net/netlabel/netlabel_kapi.c and honestly the whole NetLabel friend group 🫢:


and that's the page bestie 🌈 this gem lives in ./net/netlabel, dated October 2026, and it's filed under netlbl_cache_add(9) β€” go forth and cache those labels πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from