From dc5e2d90baeac62159dfcf14bd7400ef31d8c6ed Mon Sep 17 00:00:00 2001 From: YueGuobin Date: Mon, 5 Oct 2026 12:53:28 +0800 Subject: [PATCH] fix(iou): keep BridgeNIO filters across the NIO update route MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream's mypy pass narrowed the filter copy to UDPNIO only (the Ethernet/TAP members of the union have no filters field). BridgeNIO — the kernel-datapath NIO — carries filters too, so on an IOU kernel link every PUT of a link's filters cleared them and applied nothing: netem never landed on the anchor (e2e test_iou_kernel_datapath caught it). Narrow to (UDPNIO, BridgeNIO): still avoids attribute access on the models without the field, keeps both filter-carrying types. --- gns3server/api/routes/compute/iou_nodes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gns3server/api/routes/compute/iou_nodes.py b/gns3server/api/routes/compute/iou_nodes.py index 4ae44a215..f0ec12299 100644 --- a/gns3server/api/routes/compute/iou_nodes.py +++ b/gns3server/api/routes/compute/iou_nodes.py @@ -225,7 +225,9 @@ async def update_iou_node_nio( nio = node.get_nio(adapter_number, port_number) nio.filters.clear() - if isinstance(nio_data, schemas.UDPNIO) and nio_data.filters: + # EthernetNIO/TAPNIO carry no filters field; UDPNIO (relay) and + # BridgeNIO (kernel datapath) both do. + if isinstance(nio_data, (schemas.UDPNIO, schemas.BridgeNIO)) and nio_data.filters: nio.filters = nio_data.filters # NIO type is a Union (Ethernet/TAP/UDP/bridge); only UDPNIO and # BridgeNIO carry markers and suspend. Suspend is what the compute turns