]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
Fix broken OUTPUT timestamping since apparently kernel inits the sk_buff
authorlaforge <laforge>
Sun, 27 Apr 2003 07:39:07 +0000 (07:39 +0000)
committerlaforge <laforge>
Sun, 27 Apr 2003 07:39:07 +0000 (07:39 +0000)
with a stamp.tv_sec of 0 and junk in stamp.tv_usec. (Curtis@GreenKey.net)

pcap/ulogd_PCAP.c

index 2bebcf1c7bd40e65fb3ce677a42bd3e231e30afc..178d294dfb59b0fe11e1d3e60925929a5452f868 100644 (file)
@@ -1,4 +1,4 @@
-/* ulogd_PCAP.c, Version $Revision: 1.1 $
+/* ulogd_PCAP.c, Version $Revision: 1.2 $
  *
  * ulogd output target for writing pcap-style files (like tcpdump)
  *
@@ -20,7 +20,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * $Id: ulogd_PCAP.c,v 1.1 2002/07/30 08:00:47 laforge Exp $
+ * $Id: ulogd_PCAP.c,v 1.2 2002/12/09 14:42:44 laforge Exp $
  *
  */
 
@@ -88,7 +88,8 @@ int _output_pcap(ulog_iret_t *res)
        pchdr.len = GET_VALUE(2).ui32;
 
        if (GET_FLAGS(3) & ULOGD_RETF_VALID
-           && GET_FLAGS(4) & ULOGD_RETF_VALID) {
+           && GET_FLAGS(4) & ULOGD_RETF_VALID
+           && GET_VALUE(3).ui32 != 0) {
                pchdr.ts.tv_sec = GET_VALUE(3).ui32;
                pchdr.ts.tv_usec = GET_VALUE(4).ui32;
        } else {