From a0f2dd374ed12e30b12979f6461ec6686abf317d Mon Sep 17 00:00:00 2001 From: Jeremy Grossmann Date: Mon, 26 Feb 2018 23:18:44 +0700 Subject: [PATCH] Require uBridge version 0.9.14 on Linux --- gns3server/ubridge/hypervisor.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gns3server/ubridge/hypervisor.py b/gns3server/ubridge/hypervisor.py index 264cf679..660c930a 100644 --- a/gns3server/ubridge/hypervisor.py +++ b/gns3server/ubridge/hypervisor.py @@ -138,8 +138,14 @@ class Hypervisor(UBridgeHypervisor): match = re.search("ubridge version ([0-9a-z\.]+)", output) if match: self._version = match.group(1) - if parse_version(self._version) < parse_version("0.9.12"): - raise UbridgeError("uBridge executable version must be >= 0.9.12") + if sys.platform.startswith("win") or sys.platform.startswith("darwin"): + minimum_required_version = "0.9.12" + else: + # uBridge version 0.9.14 is required for packet filters + # to work for IOU nodes. + minimum_required_version = "0.9.14" + if parse_version(self._version) < parse_version(minimum_required_version): + raise UbridgeError("uBridge executable version must be >= {}".format(minimum_required_version)) else: raise UbridgeError("Could not determine uBridge version for {}".format(self._path)) except (OSError, subprocess.SubprocessError) as e: