summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/interface_output.c')
-rw-r--r--src/vnet/interface_output.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/interface_output.c b/src/vnet/interface_output.c
index 60953b0f35a..c863d444f5a 100644
--- a/src/vnet/interface_output.c
+++ b/src/vnet/interface_output.c
@@ -1439,6 +1439,8 @@ pcap_drop_trace_command_fn (vlib_main_t * vm,
im->pcap_main.n_packets_to_capture =
im->pcap_main.n_packets_captured;
error = pcap_write (&im->pcap_main);
+ if (im->pcap_main.file_descriptor >= 0)
+ pcap_close (&im->pcap_main);
if (error)
clib_error_report (error);
else