netfilter: nfnetlink_queue: fix timestamp attribute
authorFlorian Westphal <fw@strlen.de>
Thu, 12 May 2016 12:43:54 +0000 (14:43 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 12 May 2016 15:06:59 +0000 (17:06 +0200)
Since 4.4 we erronously use timestamp of the netlink skb (which is zero).

Bugzilla: https://bugzilla.netfilter.org/show_bug.cgi?id=1066
Fixes: b28b1e826f818c30ea7 ("netfilter: nfnetlink_queue: use y2038 safe timestamp")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nfnetlink_queue.c

index cb5b630a645b5357c9173e81cf73e076c701706b..e34256a0e7e97087b3c37d98b17a1322a6467df0 100644 (file)
@@ -499,7 +499,7 @@ nfqnl_build_packet_message(struct net *net, struct nfqnl_instance *queue,
 
        if (entskb->tstamp.tv64) {
                struct nfqnl_msg_packet_timestamp ts;
-               struct timespec64 kts = ktime_to_timespec64(skb->tstamp);
+               struct timespec64 kts = ktime_to_timespec64(entskb->tstamp);
 
                ts.sec = cpu_to_be64(kts.tv_sec);
                ts.usec = cpu_to_be64(kts.tv_nsec / NSEC_PER_USEC);