mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 14:51:13 +02:00
Only require privileged access for uBridge when connecting a cloud to an Ethernet/TAP interface. Fixes #1461.
This commit is contained in:
1 parent
ca6a0708a8
commit
3fae6ada95
3 files changed
+16
-10
No files matched your search
@@ -554,8 +554,8 @@ class BaseNode:
|
||||
if self.ubridge_path is None:
|
||||
raise NodeError("uBridge is not available, path doesn't exist, or you just installed GNS3 and need to restart your user session to refresh user permissions.")
|
||||
|
||||
if not self._manager.has_privileged_access(self.ubridge_path):
|
||||
raise NodeError("uBridge requires root access or the capability to interact with network adapters")
|
||||
#if not self._manager.has_privileged_access(self.ubridge_path):
|
||||
# raise NodeError("uBridge requires root access or the capability to interact with network adapters")
|
||||
|
||||
server_config = self._manager.config.get_section_config("Server")
|
||||
server_host = server_config.get("host")
|
||||
|
||||
@@ -299,11 +299,13 @@ class Cloud(BaseNode):
|
||||
await self._ubridge_apply_filters(bridge_name, nio.filters)
|
||||
if port_info["type"] in ("ethernet", "tap"):
|
||||
|
||||
if not self.manager.has_privileged_access(self.ubridge_path):
|
||||
raise NodeError("uBridge requires root access or the capability to interact with Ethernet and TAP adapters")
|
||||
|
||||
if sys.platform.startswith("win"):
|
||||
await self._add_ubridge_ethernet_connection(bridge_name, port_info["interface"])
|
||||
|
||||
else:
|
||||
|
||||
if port_info["type"] == "ethernet":
|
||||
network_interfaces = [interface["name"] for interface in self._interfaces()]
|
||||
if not port_info["interface"] in network_interfaces:
|
||||
|
||||
Reference in new issue
Block a user