marker: key _marker_filter_bridges by (name, link_id) so multi-link nodes toggle every copy

The _marker_filter_bridges dict was keyed by marker name alone, so when one
node hosted the same filter name on several links (IUOL-BRIDGE per node with
many bays/units, or a multi-interface router), successive apply calls
overwrote earlier entries. pause_marker_definition then toggled only the last
recorded bridge/location — other copies stayed active and kept emitting.

Key by (name, link_id) so each copy is independent, and iterate all matching
entries in _ubridge_set_marker_filter_state (both generic bridge and IOU
iol_bridge override). Toggle route existence checks also iterate matching
names. Tests updated.
This commit is contained in:
YueGuobin committed 2026-08-02 23:48:24 +08:00
1 parent 34b644a548
commit ff907da5f6
9 files changed
+25 -28

No files matched your search

@@ -382,7 +382,7 @@ async def toggle_dynamips_marker(
Toggle a marker filter on/off without an NIO rebuild (ubridge contract §3.2).
"""
if marker_name not in node._marker_filter_bridges:
if not any(n == marker_name for (n, lid) in node._marker_filter_bridges):
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail=f"Marker '{marker_name}' is not installed on this node",