batadv_check_unicast_packet(9)
π batadv_check_unicast_packet(9) π
okay so bestie, welcome to the Kernel API Manual β this one's a little function from the kernel's batman-adv corner, and honestly it's giving security-guard-at-the-door energy β¨. It's literally just checking packets before anyone lets them in. Let's go π«Ά
β¨ NAME β¨
batadv_check_unicast_packet β check for malformed unicast packets π΅οΈββοΈ
πΈ SYNOPSIS πΈ
int batadv_check_unicast_packet (struct batadv_priv *bat_priv , struct
sk_buff *skb , int hdr_size );
π ARGUMENTS π
bat_privβ the bat priv that's holding all the mesh interface information, like the group chat admin who knows every member π«Άskbβ the packet we're checking, the actual main character of this whole story π¦hdr_sizeβ size of the header to pull, i.e. how many bytes we're yoinking off the front π
π¦ DESCRIPTION π¦
So what does it actually do? It checks for a short header and bad addresses in the given packet. That's it, that's the vibe check β . If the header's too short or the addresses are sus, it's not passing β no cap.
π RETURN π
Here's the tea, and it's giving very specific negative values:
- a negative value when the check fails β and which negative value depends on the reason π
0otherwise, aka everything's fine, we love to see it π
The negative values, one by one, because every reason has its own little label:
-ENODATAβ for a bad header π-EBADRβ for a broadcast destination or source, which is lowkey not what we asked for π’-EREMOTEβ for a non-local (other host) destination, like it's cute but it's not ours π«
π₯ SEE ALSO π₯
Kernel file ./net/batman-adv/routing.c and its whole friend group (this is a long list, bestie, but we're not skipping a single one, periodt):
_batadv_update_route(9)batadv_update_route(9)batadv_window_protected(9)batadv_check_management_packet(9)batadv_skb_decrement_ttl(9)batadv_recv_my_icmp_packet(9)batadv_recv_icmp_ttl_exceeded(9)batadv_recv_icmp_packet(9)batadv_last_bonding_get(9)batadv_last_bonding_replace(9)batadv_find_router(9)batadv_route_unicast_packet(9)batadv_reroute_unicast_packet(9)batadv_check_unicast_ttvn(9)batadv_recv_unhandled_unicast_packet(9)batadv_recv_unicast_packet(9)batadv_recv_unicast_tvlv(9)batadv_recv_frag_packet(9)batadv_recv_bcast_packet(9)batadv_recv_mcast_packet(9)
okay that's the whole page, ily for reading it all π sign-off time: this one lives in ./net/batman-adv, it's dated October 2026, and it's page batadv_check_unicast_packet(9) of the Kernel API Manual β stamped and delivered ππ¦β¨
π¦ 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