$OpenBSD: patch-src_wpaclean_c,v 1.1 2019/03/09 18:02:35 sebastia Exp $

prevent wpaclean from overwriting the outputfile
with next capture each time a new capture is found
in a source file

Index: src/wpaclean.c
--- src/wpaclean.c.orig
+++ src/wpaclean.c
@@ -138,7 +138,10 @@ static void save_network(const struct network * n)
 {
 	int i;
 
-	_outfd = open_pcap(_outfilename);
+	if (_outfd == 0)
+	{
+		_outfd = open_pcap(_outfilename);
+	}
 	write_pcap(_outfd, n->n_beacon, n->n_beaconlen);
 
 	for (i = 0; i < 4; i++)
