batadv_gw_reselect(9)
π
batadv_gw_reselect β the batadv_gw_reselect(9) page, bestie edition
okay so real talk, this is a Kernel API Manual entry, and it's a short one but it's iconic in its own lowkey way πΈ the whole thing lives in the batman-adv gateway world, and we're about to get into it. no cap.
β¨ NAME β¨
batadv_gw_reselect β force a gateway reselection π«Ά
like, you're nudging the mesh and being like "bestie, maybe re-vote?" and that's the whole vibe.
π« SYNOPSIS π«
void batadv_gw_reselect (struct batadv_priv *bat_priv );
that's it. that's the function. void return, one pointer, no drama (well, some drama, see DESCRIPTION) π
π ARGUMENTS π
bat_privβ the bat priv with all the mesh interface information β¨ it's giving "everything you need to know about this mesh interface, all in one struct" energy. main character struct, honestly.
π₯ DESCRIPTION π₯
so what this actually does is set a flag π© and that flag is basically a little sticky note that says "hey GW component, reminder to perform a new gateway reselection." very remember to buy milk but for mesh gateways. we stan a reminder system.
BUT β and this is the part where you need to listen, bestie β this function does not ensure that the current gateway is going to be deselected π the reselection mechanism may elect the same gateway once again. it's literally the "we held an election and the incumbent won again" situation. democracy, baby. π³οΈ
so the tea is: invoking batadv_gw_reselect does not guarantee a gateway change, and therefore a uevent is not necessarily expected. don't be out here waiting for a uevent that never comes and then blaming yourself, that's not your fault, that's just the API being honest with you π
β οΈ lowkey important: "force a reselection" β "force a different gateway". reselection can absolutely hand you the exact same one back. internalise this and you'll save yourself so much confusion, fr fr.
π¦ SEE ALSO π¦
the whole gateway_client.c friend group, because they all show up together like a group chat:
- Kernel file
./net/batman-adv/gateway_client.cπ batadv_gw_node_release(9)batadv_gw_get_selected_gw_node(9)batadv_gw_get_selected_orig(9)batadv_gw_select(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)batadv_gw_out_of_range(9)
every single one, accounted for, no crumbs left behind π§β¨
π sign-off π
this lil masterpiece comes to you from ./net/batman-adv, dated October 2026, and remember the name: batadv_gw_reselect(9) π that's the whole page bestie, go force a reselection (or don't β it might just pick the same gateway again π) ily, bye ππ«Ά
π¦ 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