Package: pcaputils Version: 0.8-1 Severity: normal Dear Maintainer,
If we start pcapdump with NO -t switch, the dump file starts over alweys at mitnight (UTC). The default -t value is 86400. We assumed that the rotation takes place after 86400s from start time. Attached is our patch suggestion. Winfried Angele
diff -uNr pcaputils-0.8/src/pcapdump.c pcaputils-0.8.p/src/pcapdump.c --- pcaputils-0.8/src/pcapdump.c 2009-05-10 01:10:01.000000000 +0200 +++ pcaputils-0.8.p/src/pcapdump.c 2012-10-24 08:15:10.512859978 +0200 @@ -225,7 +225,7 @@ DEBUG("duration exceeded"); close_and_exit(); } - if(is_new_interval(hdr->ts.tv_sec)) + if(is_new_interval(hdr->ts.tv_sec-time_start)) reset_dump(); if(pcapdump_sample > 0 && !should_sample()) return; @@ -287,7 +287,7 @@ check_interval = false; struct timeval tv; gettimeofday(&tv, NULL); - if(is_new_interval(tv.tv_sec) && !reload_config) + if(is_new_interval(tv.tv_sec-time_start) && !reload_config) reset_dump(); if(pa.dev) alarm(1);