summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2026-06-07 14:34:28 +0200
committerSven Eckelmann <sven@narfation.org>2026-06-13 07:51:17 +0200
commitdf97a7107b16375a10a36d7a63e9b4291a8ac680 (patch)
tree187f082f87ed5a9f70b86771e041309c3334084c /tools/lib/python
parentdad4d4b92a9b9f0edb8c66deda049da1b62f6089 (diff)
batman-adv: gw: don't deselect gateway with active hardif
The batadv_hardif_cnt() was previously checking if there is an batadv_hard_iface->mesh_iface which is has the same mesh_iface. And since batadv_hardif_disable_interface() was resetting the batadv_hard_iface->mesh_iface after this check, it had to verify whether *1* interface was still part of the mesh_iface before it started the gateway deselection. But after batadv_hardif_cnt() is now checking the lower interfaces of mesh_iface and batadv_hardif_disable_interface() already removed the interface via netdev_upper_dev_unlink() earlier in this function, the check must now make sure that *0* interfaces can be found by batadv_hardif_cnt() before selected gateway must be deselected. Otherwise the deselection would already happen one batadv_hard_iface too early. Because a 0 hardif count from batadv_hardif_cnt() is equal to an empty list, it is possible to replace the counting with a simple list_empty(). Cc: stable@kernel.org Fixes: 7dc284702bcd ("batman-adv: store hard_iface as iflink private data") Reviewed-by: Nora Schiffer <neocturne@universe-factory.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions