From 8c2e28141767ae0e6d19459999874af0f99a2977 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Wed, 14 Nov 2012 20:23:56 +0100 Subject: [PATCH] netsniff-ng: fix prefix in mult pcap file Signed-off-by: Daniel Borkmann --- src/netsniff-ng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netsniff-ng.c b/src/netsniff-ng.c index 5f30228c..23b4091f 100644 --- a/src/netsniff-ng.c +++ b/src/netsniff-ng.c @@ -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); -- 2.11.4.GIT