[RFC] patch for invalid packet time from ULOG target of iptables

From: Alex Davis (alex14641_at_yahoo.com)
Date: 08/24/03

  • Next message: Bob Gill: "semaphore.c:84: spin_is_locked on uninitialized spinlock f75f38f8"
    Date:	Sun, 24 Aug 2003 07:16:00 -0700 (PDT)
    To: linux-kernel@vger.kernel.org
    
    

    I've just started playing with the ULOG target in
    iptables, and I've noticed that the 'timestamp_sec'
    member of the ulog_packet_msg_t struct paseed to
    the user is always 0 for locally generated packets.
    I was thinking of patching the ipt_ulog_target
    function in net/ipv4/netfilter/ipt_ULOG.c to
    check if timestamp_sec is 0 and if so, set it
    to the current time by adding code to test
    'timestamp_sec' after it's been set. E.g;

        pm->timestamp_sec = (*pskb)->stamp.tv_sec;
        pm->timestamp_usec = (*pskb)->stamp.tv_usec;
    + if ( pm->timestamp_sec == 0 ) {
    + pm->timestamp_sec = currrent time;
    + }

    Any comments?

    =====
    I code, therefore I am

    __________________________________
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Bob Gill: "semaphore.c:84: spin_is_locked on uninitialized spinlock f75f38f8"

    Relevant Pages

    • Re: 0xdeadbeef vs 0xdeadbeefL
      ... about obscure rules they would fail. ... fail it" because I don't know some obscure typing rule that I wouldn't ... Do you Yahoo!? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Accessing a process structure in the processes link list
      ... variable in memory, in this case it is the process ... > the kernel data structures in question. ... The all-new My Yahoo! ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: announce: kmsgdump update for 2.5.75
      ... #undef KDEBUG? ... with standard kernel reboot techniques. ... Do You Yahoo!? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: what is our answer to ZFS?
      ... is a "generation" counter for a particular inode. ... member in, the file generation number, is needed to uniquely ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • libata and RAID
      ... SCSI device sda: 156301488 512-byte hdwr sectors ... Missing /sys/block/md0 means no /dev/md0 will get created. ... Do you Yahoo!? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)