mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-22 16:59:02 +00:00
Support packet filtering for VPCS
https://github.com/GNS3/gns3-gui/issues/765
This commit is contained in:
@ -73,6 +73,10 @@ class VPCSVM(BaseNode):
|
||||
self.startup_script = startup_script
|
||||
self._ethernet_adapter = EthernetAdapter() # one adapter with 1 Ethernet interface
|
||||
|
||||
@property
|
||||
def ethernet_adapter(self):
|
||||
return self._ethernet_adapter
|
||||
|
||||
@asyncio.coroutine
|
||||
def close(self):
|
||||
"""
|
||||
@ -387,6 +391,16 @@ class VPCSVM(BaseNode):
|
||||
|
||||
return nio
|
||||
|
||||
@asyncio.coroutine
|
||||
def port_update_nio_binding(self, port_number, nio):
|
||||
if not self._ethernet_adapter.port_exists(port_number):
|
||||
raise VPCSError("Port {port_number} doesn't exist in adapter {adapter}".format(adapter=self._ethernet_adapter,
|
||||
port_number=port_number))
|
||||
if self.ubridge:
|
||||
yield from self._update_ubridge_udp_connection("VPCS-{}".format(self._id), self._local_udp_tunnel[1], nio)
|
||||
elif self.is_running():
|
||||
raise VPCSError("Sorry, adding a link to a started VPCS instance is not supported without using uBridge.")
|
||||
|
||||
@asyncio.coroutine
|
||||
def port_remove_nio_binding(self, port_number):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user