fix: keep upstream link-carrier commands off unix-socket NIO bridges

Upstream #2870 added TAP carrier control (set_nio_tap_carrier) and a
busybox interface-status monitor to the Docker base class. Both assume
TAP wiring: unix-socket NIO bridges carry no TAP NIO, so uBridge rejects
the carrier command ('bridge has no TAP NIO') and every link create,
update or delete on a running iol-runner node would fail; the monitor
polls eth{adapter} interfaces that do not exist in the container's
network namespace (or misreports the Docker default eth0 as adapter 0).

VendorDockerVM now short-circuits _set_adapter_carrier and the interface
monitor under GNS3_UNIX_SOCKET_NIO; TAP-wired vendor nodes keep the base
behavior.
This commit is contained in:
YueGuobin committed 2026-09-05 22:21:18 +08:00
1 parent e12ef7f272
commit 27b55b72f9
2 files changed
+93

No files matched your search

@@ -454,6 +454,38 @@ class VendorDockerVM(DockerVM):
if nio:
await self._connect_nio(adapter_number, nio, port_number)
async def _set_adapter_carrier(self, adapter_number, connected, port_number=0):
"""
Override: with GNS3_UNIX_SOCKET_NIO the bridges carry only unix and
UDP NIOs — there is no TAP, and uBridge rejects the carrier command
("bridge has no TAP NIO"), which would fail every link create,
update or delete on a running node. The link state is the socket
pair itself.
"""
if not self._unix_socket_nio:
await super()._set_adapter_carrier(adapter_number, connected, port_number)
async def _start_interface_monitor(self):
"""
Override: with GNS3_UNIX_SOCKET_NIO no GNS3-managed eth interface
exists in the container's network namespace — the busybox poll would
idle forever (or misreport the Docker default eth0 as adapter 0
status). Vendor images with TAP wiring keep the base monitor.
"""
if not self._unix_socket_nio:
await super()._start_interface_monitor()
async def _stop_interface_monitor(self):
"""
Override: mirror _start_interface_monitor — there is nothing to stop
when the monitor never started under unix-socket NIO.
"""
if not self._unix_socket_nio:
await super()._stop_interface_monitor()
def _cleanup_console_resources(self):
"""
Override: close the docker-exec pty socket, if any, so the next