diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2021-09-27 00:18:00 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2021-09-27 01:28:02 +0200 |
commit | e4b94da0af90e7ab707fd32d9e09e7bd767996df (patch) | |
tree | ae63f2c8c330b4e82d933ca2fc1710d7663532b2 /pcap.c | |
parent | 3943f20ef99d4146f0fa1a4025e2a62a3ad961f2 (diff) | |
download | passt-e4b94da0af90e7ab707fd32d9e09e7bd767996df.tar passt-e4b94da0af90e7ab707fd32d9e09e7bd767996df.tar.gz passt-e4b94da0af90e7ab707fd32d9e09e7bd767996df.tar.bz2 passt-e4b94da0af90e7ab707fd32d9e09e7bd767996df.tar.lz passt-e4b94da0af90e7ab707fd32d9e09e7bd767996df.tar.xz passt-e4b94da0af90e7ab707fd32d9e09e7bd767996df.tar.zst passt-e4b94da0af90e7ab707fd32d9e09e7bd767996df.zip |
pcap: Don't reinitialise packet capture if we already have one
If the guest disconnects, and a given name (without timestamp) for
the pcap file is passed, we would otherwise lose the packets
captured until that point.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'pcap.c')
-rw-r--r-- | pcap.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -162,7 +162,7 @@ void pcap_init(struct ctx *c, int index) struct tm *tm; if (pcap_fd != -1) - close(pcap_fd); + return; if (!*c->pcap) return; |