mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
fix(builtin): hide GNS3 internal bridge interfaces from Cloud node
Filter out host interfaces whose name starts with 'gns3' (e.g. EthernetSwitch kernel bridges) from Cloud.asdict() interfaces list. Other special interfaces (virbr0, docker0, etc.) remain visible.
This commit is contained in:
1 file changed
+3
@@ -82,6 +82,9 @@ class Cloud(BaseNode):
|
||||
host_interfaces = []
|
||||
network_interfaces = gns3server.utils.interfaces.interfaces()
|
||||
for interface in network_interfaces:
|
||||
# Hide GNS3 internal bridges (e.g. EthernetSwitch kernel bridges)
|
||||
if interface["name"].lower().startswith("gns3"):
|
||||
continue
|
||||
host_interfaces.append(
|
||||
{
|
||||
"name": interface["name"],
|
||||
|
||||
Reference in new issue
Block a user