Skip to content

Commit

Permalink
Fix NAT node not working on Windows. Fixes #1163.
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Sep 11, 2017
1 parent 4a2dfb0 commit 9e4cfaf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gns3server/compute/builtin/nodes/nat.py
Expand Up @@ -36,11 +36,11 @@ def __init__(self, *args, **kwargs):
raise NodeError("virbr0 is missing. You need to install libvirt")
interface = "virbr0"
else:
names = filter(lambda x: 'vmnet8' in x.lower(),
[interface["name"] for interface in gns3server.utils.interfaces.interfaces()])
if not len(list(names)):
interfaces = list(filter(lambda x: 'vmnet8' in x.lower(),
[interface["name"] for interface in gns3server.utils.interfaces.interfaces()]))
if not len(interfaces):
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 = [
{
Expand Down

0 comments on commit 9e4cfaf

Please sign in to comment.