ndisc_check_ns_na(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ndisc_check_ns_na β€” Kernel API Manual πŸ’…

okay so bestie, welcome to the ndisc_check_ns_na page β€” this is a Linux kernel API manual entry, and honestly it's giving "small function, big responsibilities" ✨


🌸 NAME 🌸

ndisc_check_ns_na β€” validate an NS/NA packet and set its transport header πŸŽ€


✨ SYNOPSIS ✨

int ndisc_check_ns_na (struct sk_buff *skb );

literally just the one arg, no cap 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • skb β€” the skb to validate πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

so what does it actually do? it validates an IPv6 packet for compliance with RFC 4861 sections 7.1.1 (Neighbor Solicitation) and 7.1.2 (Neighbor Advertisement). yes, both sections, she checked them both πŸ’…

if the packet is valid, it sets the skb transport header. slay.

⚠️ heads up bestie: the caller needs to set the skb network header. that part is on you, not her. don't come for her when it's your job πŸ™ˆ

πŸ”₯ RETURN πŸ”₯

  • 0 β€” valid NS/NA; the skb transport header has been set. icon behavior, honestly πŸ‘‘
  • -EINVAL β€” a broken packet was detected, i.e. it violates some internet standard. the packet did NOT pass the vibe check πŸ’€
  • -ENOMSG β€” IP header validation succeeded but it is not an ICMPv6 packet. close, but no πŸŽ€
  • -ENODATA β€” IP+ICMPv6 header validation succeeded but it is not a Neighbor Solicitation or Neighbor Advertisement. so near and yet so far 😭

🌈 SEE ALSO 🌈

  • Kernel file ./net/ipv6/ndisc_snoop.c β€” go read the source bestie, it's right there 🧚

and that's the whole page!! ty for reading, mwah πŸ’‹

sign-off time 🫢 this one's from the ./net/ipv6 crew, dated October 2026, and the page you just read is ndisc_check_ns_na(9) β€” stay hydrated and always set your network header first πŸ’œβœ¨

πŸ“¦ where this page comes from