batadv_gw_out_of_range(9)
π 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 theskbdata buffer viabatadv_get_vid/... Any pointer into theskbdata (e.g. obtained fromskb->dataoreth_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:
batadv_gw_node_release(9)batadv_gw_get_selected_gw_node(9)batadv_gw_get_selected_orig(9)batadv_gw_select(9)batadv_gw_reselect(9)batadv_gw_check_client_stop(9)batadv_gw_election(9)batadv_gw_check_election(9)batadv_gw_node_add(9)batadv_gw_node_get(9)batadv_gw_node_update(9)batadv_gw_node_delete(9)batadv_gw_node_free(9)batadv_gw_dump(9)batadv_gw_dhcp_recipient_get(9)
π«Ά 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
- 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