netsniff-ng: fix prefix in mult pcap file
authorDaniel Borkmann <borkmann@iogearbox.net>
Wed, 14 Nov 2012 19:23:56 +0000 (14 20:23 +0100)
committerDaniel Borkmann <borkmann@iogearbox.net>
Wed, 14 Nov 2012 19:23:56 +0000 (14 20:23 +0100)
Signed-off-by: Daniel Borkmann <borkmann@iogearbox.net>
src/netsniff-ng.c

index 5f30228..23b4091 100644 (file)
@@ -625,8 +625,8 @@ static int begin_multi_pcap_file(struct mode *mode)
        if (mode->device_out[strlen(mode->device_out) - 1] == '/')
                mode->device_out[strlen(mode->device_out) - 1] = 0;
 
-       slprintf(tmp, sizeof(tmp), "%s/%s-%lu.pcap",
-                mode->device_out, mode->prefix ? : "dump", time(0));
+       slprintf(tmp, sizeof(tmp), "%s/%s%lu.pcap",
+                mode->device_out, mode->prefix ? : "dump-", time(0));
 
        fd = open_or_die_m(tmp, O_RDWR | O_CREAT | O_TRUNC | O_LARGEFILE,
                           DEFFILEMODE);