diff options
Diffstat (limited to 'src/vnet/pg')
-rw-r--r-- | src/vnet/pg/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/pg/output.c b/src/vnet/pg/output.c index b5ee157b4c6..d8059fab186 100644 --- a/src/vnet/pg/output.c +++ b/src/vnet/pg/output.c @@ -79,7 +79,7 @@ pg_output (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) } if (pif->pcap_file_name != 0) pcap_write (&pif->pcap_main); - if (pif->pcap_main.file_descriptor >= 0 + if ((pif->pcap_main.flags & PCAP_MAIN_INIT_DONE) && pif->pcap_main.n_packets_captured >= pif->pcap_main.n_packets_to_capture) pcap_close (&pif->pcap_main); |