fix(iou): carry suspend from the NIO update body

The IOU NIO update route never copied the body's suspend flag onto the
NIO; the Docker and QEMU routes always did. Harmless on the relay, where
suspend is emulated by the synthetic frequency_drop filter the controller
injects, but fatal on a kernel link, whose suspend *is* the anchor's
admin state: a suspended link kept forwarding traffic, and the resume
looked like it worked because nothing had ever stopped.
This commit is contained in:
YueGuobin committed 2026-10-06 00:21:09 +08:00
1 parent 806afec0d8
commit f23c3bb6e6
2 files changed
+38 -1

No files matched your search

+4 -1
View File
@@ -228,8 +228,11 @@ async def update_iou_node_nio(
if isinstance(nio_data, schemas.UDPNIO) and nio_data.filters:
nio.filters = nio_data.filters
# NIO type is a Union (Ethernet/TAP/UDP/bridge); only UDPNIO and
# BridgeNIO carry markers.
# BridgeNIO carry markers and suspend. Suspend is what the compute turns
# into an admin-down anchor on a kernel link (native carrier), so it must
# reach the NIO like it does on the Docker/QEMU routes.
nio.markers = getattr(nio_data, "markers", None) or {}
nio.suspend = getattr(nio_data, "suspend", None) or False
await node.adapter_update_nio_binding(adapter_number, port_number, nio)
return nio.asdict()