From 3528efb1e02925862a3ca3ee114c7a3785063fbe Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 24 Feb 2015 23:12:09 -0700 Subject: [PATCH] Fixes packet capture for devices when spaces are present in the output file. --- gns3server/modules/dynamips/nodes/atm_switch.py | 2 +- gns3server/modules/dynamips/nodes/ethernet_hub.py | 2 +- gns3server/modules/dynamips/nodes/ethernet_switch.py | 2 +- gns3server/modules/dynamips/nodes/frame_relay_switch.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gns3server/modules/dynamips/nodes/atm_switch.py b/gns3server/modules/dynamips/nodes/atm_switch.py index 36b8f343..bf56945b 100644 --- a/gns3server/modules/dynamips/nodes/atm_switch.py +++ b/gns3server/modules/dynamips/nodes/atm_switch.py @@ -374,7 +374,7 @@ class ATMSwitch(Device): raise DynamipsError("Port {} has already a filter applied".format(port_number)) yield from nio.bind_filter("both", "capture") - yield from nio.setup_filter("both", "{} {}".format(data_link_type, output_file)) + yield from nio.setup_filter("both", '{} "{}"'.format(data_link_type, output_file)) log.info('ATM switch "{name}" [{id}]: starting packet capture on port {port}'.format(name=self._name, id=self._id, diff --git a/gns3server/modules/dynamips/nodes/ethernet_hub.py b/gns3server/modules/dynamips/nodes/ethernet_hub.py index 33807c97..23fb2129 100644 --- a/gns3server/modules/dynamips/nodes/ethernet_hub.py +++ b/gns3server/modules/dynamips/nodes/ethernet_hub.py @@ -155,7 +155,7 @@ class EthernetHub(Bridge): raise DynamipsError("Port {} has already a filter applied".format(port_number)) yield from nio.bind_filter("both", "capture") - yield from nio.setup_filter("both", "{} {}".format(data_link_type, output_file)) + yield from nio.setup_filter("both", '{} "{}"'.format(data_link_type, output_file)) log.info('Ethernet hub "{name}" [{id}]: starting packet capture on port {port}'.format(name=self._name, id=self._id, diff --git a/gns3server/modules/dynamips/nodes/ethernet_switch.py b/gns3server/modules/dynamips/nodes/ethernet_switch.py index 1f3abdbe..3814e720 100644 --- a/gns3server/modules/dynamips/nodes/ethernet_switch.py +++ b/gns3server/modules/dynamips/nodes/ethernet_switch.py @@ -305,7 +305,7 @@ class EthernetSwitch(Device): raise DynamipsError("Port {} has already a filter applied".format(port_number)) yield from nio.bind_filter("both", "capture") - yield from nio.setup_filter("both", "{} {}".format(data_link_type, output_file)) + yield from nio.setup_filter("both", '{} "{}"'.format(data_link_type, output_file)) log.info('Ethernet switch "{name}" [{id}]: starting packet capture on port {port}'.format(name=self._name, id=self._id, diff --git a/gns3server/modules/dynamips/nodes/frame_relay_switch.py b/gns3server/modules/dynamips/nodes/frame_relay_switch.py index d30578be..1a21dd56 100644 --- a/gns3server/modules/dynamips/nodes/frame_relay_switch.py +++ b/gns3server/modules/dynamips/nodes/frame_relay_switch.py @@ -280,7 +280,7 @@ class FrameRelaySwitch(Device): raise DynamipsError("Port {} has already a filter applied".format(port_number)) yield from nio.bind_filter("both", "capture") - yield from nio.setup_filter("both", "{} {}".format(data_link_type, output_file)) + yield from nio.setup_filter("both", '{} "{}"'.format(data_link_type, output_file)) log.info('Frame relay switch "{name}" [{id}]: starting packet capture on port {port}'.format(name=self._name, id=self._id,