From 4b891070d2ff7c3a326b270e5d1a4b042c452eba Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 5 Sep 2016 18:02:49 +0200 Subject: [PATCH] Ignore interface without netmask in udp tunnel --- gns3server/controller/compute.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gns3server/controller/compute.py b/gns3server/controller/compute.py index 1193e8d0..3a823d1d 100644 --- a/gns3server/controller/compute.py +++ b/gns3server/controller/compute.py @@ -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)