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, 1 insertions, 1 deletions
diff --git a/src/vnet/interface_output.c b/src/vnet/interface_output.c
index 9702a9e31ee..bf21587ae4d 100644
--- a/src/vnet/interface_output.c
+++ b/src/vnet/interface_output.c
@@ -1441,7 +1441,7 @@ 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)
+ if (im->pcap_main.flags & PCAP_MAIN_INIT_DONE)
pcap_close (&im->pcap_main);
if (error)
clib_error_report (error);