mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-18 15:28:11 +00:00
Fix remote packet capture for Dynamips.
This commit is contained in:
@ -441,9 +441,7 @@ class EthernetSwitch(Device):
|
||||
if nio.input_filter[0] is not None and nio.output_filter[0] is not None:
|
||||
raise DynamipsError("Port {} has already a filter applied".format(port_number))
|
||||
|
||||
await nio.bind_filter("both", "capture")
|
||||
await nio.setup_filter("both", '{} "{}"'.format(data_link_type, output_file))
|
||||
|
||||
await nio.start_packet_capture(output_file, data_link_type)
|
||||
log.info('Ethernet switch "{name}" [{id}]: starting packet capture on port {port}'.format(name=self._name,
|
||||
id=self._id,
|
||||
port=port_number))
|
||||
@ -458,7 +456,7 @@ class EthernetSwitch(Device):
|
||||
nio = self.get_nio(port_number)
|
||||
if not nio.capturing:
|
||||
return
|
||||
await nio.unbind_filter("both")
|
||||
await nio.stop_packet_capture()
|
||||
log.info('Ethernet switch "{name}" [{id}]: stopping packet capture on port {port}'.format(name=self._name,
|
||||
id=self._id,
|
||||
port=port_number))
|
||||
|
Reference in New Issue
Block a user