netlink_net_capable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the netlink_net_capable page from the Kernel API Manual πŸŽ€ this is the capability-testing girlie of the netlink world and honestly she eats ✨


🌸 NAME 🌸

netlink_net_capable β€” the Netlink network namespace message capability test. yes that's the whole name, she's not tryna be mysterious πŸ’…


✨ SYNOPSIS ✨

bool netlink_net_capable (const struct sk_buff *skb , int cap );

literally that's it. two args, one bool back. iconic minimalism 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • skb β€” the socket buffer holding a netlink command from userspace πŸ“¦ like, this is the message packet that came in from userland, and it's the whole reason we're here.
  • cap β€” the capability to use πŸ”‘ the specific capability we're checking for. not vibes, an actual capability.

πŸ”₯ DESCRIPTION πŸ”₯

okay so this function runs a little vibe check on two things at once, no cap:

  • whether the opener of the socket we received the message from had it when the netlink socket was created πŸ’«
  • and whether the sender of the message has the capability cap over the network namespace of the socket we received the message from 🌈

so yeah, it's testing permissions in two directions β€” the original socket opener and the message sender β€” and both answers are doing the heavy lifting here πŸ‘‘

ngl the source wording is lowkey doing the most in that first clause, but that's exactly what it says, so we're keeping it fr fr πŸ™ˆ

🧚 SEE ALSO 🧚

go read the kernel file ./net/netlink/af_netlink.c first, bestie, that's where the lore lives πŸ“– and then these icons:


mwah πŸ’– this page lives in ./net/netlink and it was stamped October 2026 β€” go forth and check those capabilities, bestie, you're gonna slay βœ¨πŸ’…

πŸ“¦ where this page comes from