summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2026-08-30 17:21:38 +0200
committerSven Eckelmann <sven@narfation.org>2026-08-30 20:05:45 +0200
commitbbfb0d2cf03538d3db0580849720bc5fe773d515 (patch)
treea0e536bf17d295c316a6fe4d3f1cd472d9b6d5ff /tools/lib/python/kdoc
parentd9304a90eca5703ae8301415b417ad63ddd44d7f (diff)
batman-adv: tt: remove only the entry which was looked up from the hash
batadv_hash_remove() searches a bucket with a compare callback and unlinks the first matching entry. batadv_compare_tt() matches any entry for the same MAC address and VLAN, not the object which was passed in, and the callers in batadv_tt_local_remove() and batadv_tt_global_free() are not serialized against the rest of the translation table in any way. So when the looked up entry was already unlinked by another context and a new entry for the same client was added in the meantime, these two functions unlink that new entry instead. Add batadv_compare_tt_entry(), which matches the very object which is searched for, and use it for both removals. Nothing is unlinked when the entry is gone already, batadv_hash_remove() then simply returns NULL and only the reference of the calling context is dropped. As a side effect the returned hlist_node can no longer belong to a different object, so both functions can operate on the entry they were given. Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions