netlink_net_capable(9)
π netlink_net_capable(9) β a kernel API manual moment
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
capover 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:
__netlink_ns_capable(9)netlink_ns_capable(9)netlink_capable(9)netlink_set_err(9)netlink_change_ngroups(9)nlmsg_notify(9)
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
- 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