mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Allow for (a lot) more docker container ports. Fixes #593.
This commit is contained in:
1 parent
7422d06c1d
commit
379c216109
2 files changed
+11
-11
No files matched your search
@@ -622,11 +622,11 @@ class DockerVM(BaseVM):
|
||||
raise DockerError(
|
||||
"Adapter {adapter_number} doesn't exist on Docker container '{name}'".format(name=self.name, adapter_number=adapter_number))
|
||||
|
||||
for index in range(128):
|
||||
if "veth-gns3-ext{}".format(index) not in psutil.net_if_addrs():
|
||||
for index in range(4096):
|
||||
if "gns3-ext{}".format(index) not in psutil.net_if_addrs():
|
||||
adapter.ifc = "eth{}".format(str(index))
|
||||
adapter.host_ifc = "veth-gns3-ext{}".format(str(index))
|
||||
adapter.guest_ifc = "veth-gns3-int{}".format(str(index))
|
||||
adapter.host_ifc = "gns3-ext{}".format(str(index))
|
||||
adapter.guest_ifc = "gns3-int{}".format(str(index))
|
||||
break
|
||||
if not hasattr(adapter, "ifc"):
|
||||
raise DockerError(
|
||||
|
||||
Reference in new issue
Block a user