selinux_netl...conn_request(9)
π 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 doorfamilyβ 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):
selinux_netlbl_sidlookup_cached(9)selinux_netlbl_sock_genattr(9)selinux_netlbl_sock_getattr(9)selinux_netlbl_cache_invalidate(9)selinux_netlbl_err(9)selinux_netlbl_sk_security_free(9)selinux_netlbl_sk_security_reset(9)selinux_netlbl_skbuff_getsid(9)selinux_netlbl_skbuff_setsid(9)selinux_netlbl_sctp_assoc_request(9)selinux_netlbl_inet_csk_clone(9)selinux_netlbl_sctp_sk_clone(9)selinux_netlbl_socket_post_create(9)selinux_netlbl_sock_rcv_skb(9)selinux_netlbl_option(9)selinux_netlbl_socket_setsockopt(9)selinux_netlbl_socket_connect_helper(9)selinux_netlbl_socket_connect_locked(9)selinux_netlbl_socket_connect(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
- 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