Project

General

Profile

Actions

Bug #461

closed

tt: Potential stuck roam when pending

Added by Sven Eckelmann 4 months ago. Updated 10 days ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
07/30/2026
Due date:
% Done:

0%

Estimated time:

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


Related issues 1 (0 open — 1 closed)

Related to batman-adv - Bug #472: tt: potential pending vs. roam conflict in batadv_tt_local_add_existing()Closedbatman-adv developers09/01/2026

Actions
Actions #1

Updated by Sven Eckelmann about 1 month ago

  • Assignee changed from batman-adv developers to Antonio Quartulli
Actions #2

Updated by Sven Eckelmann about 1 month ago

  • Related to Bug #472: tt: potential pending vs. roam conflict in batadv_tt_local_add_existing() added
Actions #4

Updated by Sven Eckelmann 15 days ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Antonio Quartulli to Sven Eckelmann
  • Target version set to 2026.4
Actions #5

Updated by Sven Eckelmann 10 days ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF