mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-25 16:28:11 +00:00
Handle vmnet interfaces in the cloud on OSX. Fixes #554.
This commit is contained in:
parent
a35f41e4dc
commit
3c9e8507d1
@ -165,9 +165,15 @@ class Cloud(BaseNode):
|
|||||||
interface=port_info["interface"]))
|
interface=port_info["interface"]))
|
||||||
else:
|
else:
|
||||||
if sys.platform.startswith("darwin") and port_info["interface"].startswith("en"):
|
if sys.platform.startswith("darwin") and port_info["interface"].startswith("en"):
|
||||||
|
# Wireless adapters are not well supported by the libpcap on OSX
|
||||||
raise NodeError("Connecting to a Wireless adapter is not supported.")
|
raise NodeError("Connecting to a Wireless adapter is not supported.")
|
||||||
yield from self._ubridge_send('bridge add_nio_ethernet {name} "{interface}"'.format(name=bridge_name,
|
if sys.platform.startswith("darwin") and port_info["interface"].startswith("vmnet"):
|
||||||
interface=port_info["interface"]))
|
# Use a special NIO to connect to VMware vmnet interfaces on OSX (libpcap doesn't support them)
|
||||||
|
yield from self._ubridge_send('bridge add_nio_fusion_vmnet {name} "{interface}"'.format(name=bridge_name,
|
||||||
|
interface=port_info["interface"]))
|
||||||
|
else:
|
||||||
|
yield from self._ubridge_send('bridge add_nio_ethernet {name} "{interface}"'.format(name=bridge_name,
|
||||||
|
interface=port_info["interface"]))
|
||||||
|
|
||||||
elif port_info["type"] == "tap":
|
elif port_info["type"] == "tap":
|
||||||
yield from self._ubridge_send('bridge add_nio_tap {name} "{interface}"'.format(name=bridge_name,
|
yield from self._ubridge_send('bridge add_nio_tap {name} "{interface}"'.format(name=bridge_name,
|
||||||
|
Loading…
Reference in New Issue
Block a user