batadv_gw_out_of_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_gw_out_of_range β€” a Kernel API Manual moment (section 9, bestie)

okay so this is batadv_gw_out_of_range, straight out of the Kernel API Manual, and it's literally the vibe check for your DHCP packets πŸ¦‹


✨ NAME ✨

batadv_gw_out_of_range β€” check if the dhcp request destination is the best gateway πŸ‘‘

🌸 SYNOPSIS 🌸

bool batadv_gw_out_of_range (struct batadv_priv *bat_priv , struct
sk_buff *skb );

πŸŽ€ ARGUMENTS πŸŽ€

  • bat_priv β€” the bat priv with all the mesh interface information. all of it. the whole gossip folder πŸ’–
  • skb β€” the outgoing packet, aka the little message about to leave the group chat ✈️

πŸ’… DESCRIPTION πŸ’…

so what this does: it checks if the skb is a DHCP request, and if it's being sent to the current best GW server. because of topology changes, it may be the case that the GW server previously selected is not the best one anymore β€” like, the group chat admin changed and nobody told you 😭

Warning: This function may reallocate the skb data buffer via batadv_get_vid/... Any pointer into the skb data (e.g. obtained from skb->data or eth_hdr) before this call must be considered invalid afterwards and has to be reacquired. ngl this is the important part β€” your old pointers are giving expired-story energy, do NOT keep using them πŸ’€

Must be invoked only when the DHCP packet is going TO a DHCP SERVER. that's the rule, periodt πŸ™ˆ

⭐ RETURN ⭐

true if the packet destination is unicast and it is not the best gw, false otherwise. iconic boolean behavior, no notes πŸ”₯

🌈 SEE ALSO 🌈

Kernel file ./net/batman-adv/gateway_client.c and its whole friend group:


🫢 okay that's the whole page, bestie β€” this one lives in ./net/batman-adv, dated October 2026, and it ate, no cap πŸ’œβœ¨

πŸ“¦ where this page comes from