1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Ignore interface without netmask in udp tunnel

This commit is contained in:
Julien Duponchelle 2016-09-05 18:02:49 +02:00
parent 5ae456d6e2
commit 4b891070d2
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -551,7 +551,8 @@ class Compute:
other_compute_interfaces = sorted(other_compute_interfaces, key=lambda i: i["ip_address"] != other_compute.host_ip)
for this_interface in this_compute_interfaces:
if len(this_interface["ip_address"]) == 0:
# Skip if no ip or no netmask (vbox when stopped set a null netmask)
if len(this_interface["ip_address"]) == 0 or this_interface["netmask"] is None:
continue
this_network = ipaddress.ip_network("{}/{}".format(this_interface["ip_address"], this_interface["netmask"]), strict=False)