mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
Allows the creation of non-existent TAP interfaces when using the cloud.
This commit is contained in:
parent
c8f37381f4
commit
4eb03b5a99
@ -162,9 +162,6 @@ class Cloud(BaseNode):
|
||||
rport=nio.rport))
|
||||
|
||||
if port_info["type"] in ("ethernet", "tap"):
|
||||
network_interfaces = [interface["name"] for interface in interfaces()]
|
||||
if not port_info["interface"] in network_interfaces:
|
||||
raise NodeError("Interface '{}' could not be found on this system".format(port_info["interface"]))
|
||||
|
||||
if sys.platform.startswith("win"):
|
||||
windows_interfaces = interfaces()
|
||||
@ -181,6 +178,10 @@ class Cloud(BaseNode):
|
||||
else:
|
||||
|
||||
if port_info["type"] == "ethernet":
|
||||
network_interfaces = [interface["name"] for interface in interfaces()]
|
||||
if not port_info["interface"] in network_interfaces:
|
||||
raise NodeError("Interface '{}' could not be found on this system".format(port_info["interface"]))
|
||||
|
||||
if sys.platform.startswith("linux"):
|
||||
# use raw sockets on Linux
|
||||
yield from self._ubridge_send('bridge add_nio_linux_raw {name} "{interface}"'.format(name=bridge_name,
|
||||
|
Loading…
Reference in New Issue
Block a user