selinux_netl...conn_request(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… selinux_netlbl_inet_conn_request(9) β€” a Kernel API Manual moment ✨

okay so bestie, welcome to the Kernel API Manual, section 9, and today's main character is selinux_netlbl_inet_conn_request πŸŽ€ like yes we are diving into SELinux netlabel land and it's giving very much "security labels but make it networking" πŸ¦‹


🌸 NAME 🌸

selinux_netlbl_inet_conn_request β€” Label an incoming stream connection πŸ’–

no cap, that's literally the whole job. it labels stuff. incoming stream connection stuff. iconic.


✨ SYNOPSIS ✨

int selinux_netlbl_inet_conn_request (struct request_sock *req , u16
family );

look at her. returning an int, taking a struct request_sock *req and a u16 family. she's booked and busy πŸ’… (and yes, the line break is exactly where it is, don't come for me, that's just how the page is laid out 🫢)


🧚 ARGUMENTS 🧚

  • req β€” the incoming connection request socket πŸ“ like, the little baby request that just showed up at the door
  • family β€” the request socket's address family 🌈 you know, the whole "what kind of address are we even speaking" situation

πŸ”₯ DESCRIPTION πŸ”₯

so picture this: a new incoming connection request rolls up, and it's represented by req πŸ‘‘ that's the vibe. we need to label the new request_sock right here, at this exact moment, and then the stack will ensure the on-the-wire label will get preserved when a full sock is created once the connection handshake is complete ✨ like the label travels with you through the whole glow-up from request sock to full sock, no losing it in the group chat πŸ’–

Returns zero on success, negative values on failure. that's it, that's the contract 😭 zero = slay, negative = something went sideways, check yourself πŸ™ˆ


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./security/selinux/netlabel.c β€” yes that's the source file, go read her, she's right there πŸ“

and the whole friend group, all blessed, all (9):

fr fr, that's the whole crew. go say hi 🫢


ok tiny reminder bestie: this page comes from the ./security/selinux source and it's dated October 2026 β€” so when you cite it, cite it right πŸ’…βœ¨ mwah, go label something, you got this πŸŽ€πŸ’–
πŸ“¦ where this page comes from