Fix remote packet capture and make sure packet capture is stopped when deleting an NIO. Fixes https://github.com/GNS3/gns3-gui/issues/2753

This commit is contained in:
grossmj committed 2019-04-01 19:47:31 +07:00
1 parent f01706e9e6
commit 4cc5dbc228
18 files changed
+73 -4

No files matched your search

@@ -181,6 +181,7 @@ class ATMSwitch(Device):
if port_number not in self._nios:
raise DynamipsError("Port {} is not allocated".format(port_number))
await self.stop_capture(port_number)
# remove VCs mapped with the port
for source, destination in self._active_mappings.copy().items():
if len(source) == 3 and len(destination) == 3:
@@ -466,6 +467,8 @@ class ATMSwitch(Device):
"""
nio = self.get_nio(port_number)
if not nio.capturing:
return
await nio.unbind_filter("both")
log.info('ATM switch "{name}" [{id}]: stopping packet capture on port {port}'.format(name=self._name,
id=self._id,