Commit 1d2da42f authored by Martin Josefsson's avatar Martin Josefsson Committed by David S. Miller

[NETFILTER]: Add timestamping to ipt_ULOG

After Andi's timestamp optimizations we don't have any timestamps on the
packets unless someone requested them. Here's a patch for 2.6 to
explicitly timestamp the packets before we log them.

Harald approved it some time ago, he's pretty busy so I'm sending it
instead.
Signed-off-by: default avatarMartin Josefsson <gandalf@netfilter.org>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent f541a945
...@@ -217,6 +217,10 @@ static void ipt_ulog_packet(unsigned int hooknum, ...@@ -217,6 +217,10 @@ static void ipt_ulog_packet(unsigned int hooknum,
pm = NLMSG_DATA(nlh); pm = NLMSG_DATA(nlh);
/* We might not have a timestamp, get one */
if (skb->stamp.tv_sec == 0)
do_gettimeofday((struct timeval *)&skb->stamp);
/* copy hook, prefix, timestamp, payload, etc. */ /* copy hook, prefix, timestamp, payload, etc. */
pm->data_len = copy_len; pm->data_len = copy_len;
pm->timestamp_sec = skb->stamp.tv_sec; pm->timestamp_sec = skb->stamp.tv_sec;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment