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>
This commit is contained in:
parent
3943f20ef9
commit
e4b94da0af
1 changed files with 1 additions and 1 deletions
2
pcap.c
2
pcap.c
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue