mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC] patch for invalid packet time from ULOG target of iptables
@ 2003-08-24 14:16 Alex Davis
  2003-08-24 15:00 ` Harald Welte
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Davis @ 2003-08-24 14:16 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-08-24 15:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-24 14:16 [RFC] patch for invalid packet time from ULOG target of iptables Alex Davis
2003-08-24 15:00 ` Harald Welte
2003-08-24 15:20   ` Alex Davis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®