trace_landlo...y_access_net(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… trace_landlo...y_access_net(9) β€” network access denied, bestie

okay so this is a page from the Kernel API Manual and it's literally all about trace_landlock_deny_access_net β€” the trace event that fires the second a Landlock domain says "nope" to a network operation. it's giving security girlie with a clipboard. let's get into it πŸŽ€


✨ NAME ✨

trace_landlock_deny_access_net β€” Network access denied

like, the whole personality is in the name. a network thing got denied. that's the tweet. πŸ¦‹


✨ SYNOPSIS ✨

void trace_landlock_deny_access_net (const struct landlock_hierarchy *hierarchy , bool same_exec , bool logged , const struct landlock_blockers *blockers , const struct sock *sk , u16 socket_family , const struct sockaddr_storage *address , int addrlen );

it returns void, so don't go looking for a return value, she doesn't do that πŸ’…


✨ ARGUMENTS ✨

  • hierarchy β€” the denying domain's hierarchy node, and it is never NULL (iconic, honestly). its id is the domain field.
  • same_exec β€” a bool that tells you whether the current task entered the denying domain itself. main character behavior check 🫢
  • logged β€” the domain's audit-logging decision for this denial. basically: did we write this down or not.
  • blockers β€” request type plus the final missing access subset. never NULL, bestie, don't even try it.
  • sk β€” the socket object (never NULL), but heads up: it's read without a socket lock, so its fields are a best-effort snapshot. it's giving blurry candid photo, not a professional headshot πŸ“Έ
  • socket_family β€” a u16 snapshot of the socket family, used by the verdict.
  • address β€” the authoritative address that the verdict actually checked (never NULL). the producer copies addrlen bytes from the checked address and zeroes out the rest of the storage before emission. and the sockaddr_in.sin_port or sockaddr_in6.sin6_port member, when present, stays in network endianness β€” do not come for her byte order ⭐
  • addrlen β€” the validated signed length of address. signed, yes, we know, it's fine.

✨ DESCRIPTION ✨

this event gets emitted when a Landlock domain denies a network operation. periodt. πŸ”₯

the blocker tells you whether the address is a bind policy object or a connect/send policy object β€” iykyk.

and the flattened port field? it's converted from the checked address to host endianness. or it's -1 when no port was checked at all. and just so we're clear: 0 is a valid checked port, so don't go treating zero like it means nothing, that's so rude 😭


✨ SEE ALSO ✨


ok that's the whole page, you ate that πŸ’– go forth and trace your denials responsibly 🌸

mwah πŸ’‹ this came from ./include/trace/events, dated October 2026, and it's the trace_landlo...y_access_net(9) page β€” yeah the header truncated it too, we don't know why, we don't ask 🧚

πŸ“¦ where this page comes from