Bug #461
opentt: Potential stuck roam when pending
0%
Description
Does batadv_tt_local_add() skip clearing the BATADV_TT_CLIENT_ROAM flag if the client returns while still marked as BATADV_TT_CLIENT_PENDING?
When a local client roams away, batadv_tt_local_remove() marks it with BATADV_TT_CLIENT_ROAM and BATADV_TT_CLIENT_PENDING. If the client quickly roams back, batadv_tt_local_add() handles the pending state:
if (flags & BATADV_TT_CLIENT_PENDING) {
atomic_andnot(BATADV_TT_CLIENT_PENDING, &tt_local->common.flags);
goto add_event;
}
Because this branches directly to the add_event label just above check_roaming, it bypasses the ROAM check entirely:
if (flags & BATADV_TT_CLIENT_ROAM) {
atomic_andnot(BATADV_TT_CLIENT_ROAM, &tt_local->common.flags);
roamed_back = true;
}
Can this result in a local TT entry becoming permanently trapped with the BATADV_TT_CLIENT_ROAM flag set, preventing batadv_is_my_client() from ever returning true and causing the node to drop or misroute packets for this active local client?
See https://sashiko.dev/#/patchset/20260730-tt-fixes-v1-0-64e9e525d555%40narfation.org?part=4
No data to display