From b8ac76f047f7ae940f20f3b875b728e64353616f Mon Sep 17 00:00:00 2001 From: YueGuobin Date: Thu, 6 Aug 2026 21:33:34 +0800 Subject: [PATCH] ubridge: require version >= 1.2.0 Drop the platform-specific floor (0.9.12 darwin / 0.9.14 others) in favour of a single 1.2.0 minimum. This server now relies on features only present in recent uBridge builds: the AF_UNIX control channel (-U / SO_PEERCRED), the marker (mark) filter, and the brctl-backed builtin Ethernet Switch. Removes the now-unused sys import left behind by the dropped darwin branch (target is Linux-only). --- gns3server/compute/ubridge/hypervisor.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/gns3server/compute/ubridge/hypervisor.py b/gns3server/compute/ubridge/hypervisor.py index ae8334662..89d815100 100644 --- a/gns3server/compute/ubridge/hypervisor.py +++ b/gns3server/compute/ubridge/hypervisor.py @@ -18,7 +18,6 @@ Represents a uBridge hypervisor and starts/stops the associated uBridge process. """ -import sys import os import socket import subprocess @@ -154,19 +153,17 @@ class Hypervisor(UBridgeHypervisor): async def _check_ubridge_version(self, env=None): """ - Checks if the ubridge executable version + Checks if the ubridge executable version meets the minimum required. """ try: output = await subprocess_check_output(self._path, "-v", cwd=self._working_dir, env=env) match = re.search(r"ubridge version ([0-9a-z\.]+)", output) if match: self._version = match.group(1) - if 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" + # uBridge >= 1.2.0 is required for features this server now + # relies on: the AF_UNIX control channel (-U), the marker + # (mark) filter, and the brctl-backed builtin Ethernet Switch. + minimum_required_version = "1.2.0" if parse_version(self._version) < parse_version(minimum_required_version): raise UbridgeError(f"uBridge executable version must be >= {minimum_required_version}") else: