mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-27 08:21:24 +00:00
Fix NAT node not working on Windows. Fixes #1163.
This commit is contained in:
parent
4a2dfb0037
commit
9e4cfaf787
@ -36,11 +36,11 @@ class Nat(Cloud):
|
|||||||
raise NodeError("virbr0 is missing. You need to install libvirt")
|
raise NodeError("virbr0 is missing. You need to install libvirt")
|
||||||
interface = "virbr0"
|
interface = "virbr0"
|
||||||
else:
|
else:
|
||||||
names = filter(lambda x: 'vmnet8' in x.lower(),
|
interfaces = list(filter(lambda x: 'vmnet8' in x.lower(),
|
||||||
[interface["name"] for interface in gns3server.utils.interfaces.interfaces()])
|
[interface["name"] for interface in gns3server.utils.interfaces.interfaces()]))
|
||||||
if not len(list(names)):
|
if not len(interfaces):
|
||||||
raise NodeError("vmnet8 is missing. You need to install VMware or use the NAT node on GNS3 VM")
|
raise NodeError("vmnet8 is missing. You need to install VMware or use the NAT node on GNS3 VM")
|
||||||
interface = "vmnet8"
|
interface = interfaces[0] # take the first available interface containing the vmnet8 name
|
||||||
|
|
||||||
ports = [
|
ports = [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user