mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 14:51:13 +02:00
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:
1 parent
f01706e9e6
commit
4cc5dbc228
18 files changed
+73
-4
No files matched your search
@@ -441,6 +441,7 @@ class Cloud(BaseNode):
|
||||
if port_number not in self._nios:
|
||||
raise NodeError("Port {} is not allocated".format(port_number))
|
||||
|
||||
await self.stop_capture(port_number)
|
||||
nio = self._nios[port_number]
|
||||
if isinstance(nio, NIOUDP):
|
||||
self.manager.port_manager.release_udp_port(nio.lport, self._project)
|
||||
@@ -504,6 +505,8 @@ class Cloud(BaseNode):
|
||||
"""
|
||||
|
||||
nio = self.get_nio(port_number)
|
||||
if not nio.capturing:
|
||||
return
|
||||
nio.stopPacketCapture()
|
||||
bridge_name = "{}-{}".format(self._id, port_number)
|
||||
await self._ubridge_send("bridge stop_capture {name}".format(name=bridge_name))
|
||||
|
||||
Reference in new issue
Block a user