mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-10-13 14:05:36 +03:00
fix(iou): keep BridgeNIO filters across the NIO update route
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.
This commit is contained in:
parent
7d04d08dba
commit
dc5e2d90ba
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user