netlbl_req_setattr(9)
β¨ netlbl_req_setattr(9) β¨
okay so bestie, we're in the Kernel API Manual today and this one is a little function from the netlabel corner of the kernel (the ./net/netlabel directory, iykyk) π
it's called netlbl_req_setattr and honestly? it's giving "small but crucial." let's get into it π
πΈ NAME πΈ
netlbl_req_setattr β label a request socket using the correct protocol π¦
β SYNOPSIS β
int netlbl_req_setattr (struct request_sock *req , const struct
netlbl_lsm_secattr *secattr );
no cap, that's the whole signature. two args, one int coming back at you β¨
π ARGUMENTS π
reqβ the request socket you wanna label π«Ά like, this is the one getting its glow-up.secattrβ the security attributes. the actual label content, bestie π
π DESCRIPTION π
So the vibe is: attach the correct label to the given socket, using the security attributes you passed in secattr π₯
It returns zero on success, and negative values on failure π so yeah β check that return value, fr fr. zero is the slay outcome, anything negative is the "not me getting an error" outcome π
π¦ SEE ALSO π¦
First up, the kernel file: ./net/netlabel/netlabel_kapi.c β that's where the source lives, go peek π
And then the whole squad, because netlabel has a LOT of friends:
netlbl_cfg_map_del(9)netlbl_cfg_unlbl_map_add(9)netlbl_cfg_unlbl_static_add(9)netlbl_cfg_unlbl_static_del(9)netlbl_cfg_cipsov4_add(9)netlbl_cfg_cipsov4_del(9)netlbl_cfg_cipsov4_map_add(9)netlbl_cfg_calipso_add(9)netlbl_cfg_calipso_del(9)netlbl_cfg_calipso_map_add(9)_netlbl_catmap_getnode(9)netlbl_catmap_walk(9)netlbl_catmap_walkrng(9)netlbl_catmap_getlong(9)netlbl_catmap_setbit(9)netlbl_catmap_setrng(9)netlbl_catmap_setlong(9)netlbl_bitmap_walk(9)netlbl_bitmap_setbit(9)netlbl_enabled(9)netlbl_sock_setattr(9)netlbl_sock_delattr(9)netlbl_sock_getattr(9)netlbl_sk_lock_check(9)netlbl_conn_setattr(9)netlbl_req_delattr(9)netlbl_skbuff_setattr(9)netlbl_skbuff_getattr(9)netlbl_skbuff_err(9)netlbl_cache_invalidate(9)netlbl_cache_add(9)netlbl_audit_start(9)netlbl_init(9)
like, that's the entire netlabel extended universe, and every single one of them is iconic in its own way π
lowkey reminder: this page is from the ./net/netlabel source, dated October 2026, and it's filed under the Kernel API Manual π
okay that's the page, bestie β go label those request sockets and remember: zero on success, negative on failure, always check the return πΈπ β¨
π¦ 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