mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
fix(docker): bring the veth host end up before a relay attach
The unified veth host end is born admin-down (carrier off until a link attaches), and libpcap cannot open a packet socket on an admin-down interface — its netlink promiscuous-mode transaction returns ENOENT, so 'bridge add_nio_ethernet' failed on every runtime relay link (and would on any relay link at container start). Bring the interface up for the attach; the carrier pass in the caller refines the state afterwards (a suspended NIO sets it back down). Verified live with a direct uBridge probe: attach on a down veth -> ENOENT, after 'link set up' -> OK.
This commit is contained in:
2 files changed
+10
No files matched your search
@@ -222,6 +222,9 @@ async def test_add_ubridge_connection_udp_relays_over_veth(vm):
|
||||
[
|
||||
call.send(f'docker create_veth "{host_ifc}" "{vm._veth_names(0, 0)[1]}"'),
|
||||
call.send("bridge create bridge0"),
|
||||
# the host end is born down; libpcap cannot attach to an
|
||||
# admin-down interface, so the relay brings it up first
|
||||
call.send(f'link set "{host_ifc}" up'),
|
||||
call.send(f'bridge add_nio_ethernet bridge0 "{host_ifc}"'),
|
||||
call.send("bridge add_nio_udp bridge0 4242 127.0.0.1 4343"),
|
||||
call.send("bridge start bridge0"),
|
||||
|
||||
Reference in new issue
Block a user