Messages in this thread | | | Date | Sun, 24 Aug 2003 07:16:00 -0700 (PDT) | From | Alex Davis <> | Subject | [RFC] patch for invalid packet time from ULOG target of iptables |
| |
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/
| |