summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2007-11-13 03:49:53 -0800
committerDavid S. Miller <davem@davemloft.net>2007-11-13 03:49:53 -0800
commit53756524e42a71011f5ae6410d6ac386bf3a9e7b (patch)
tree3c168853549faee76be49b724d8da21a56a13ff2 /net
parent022cbae611a37eda80d498f8f379794c8ac3be47 (diff)
downloadlinux-3.10-53756524e42a71011f5ae6410d6ac386bf3a9e7b.tar.gz
linux-3.10-53756524e42a71011f5ae6410d6ac386bf3a9e7b.tar.bz2
linux-3.10-53756524e42a71011f5ae6410d6ac386bf3a9e7b.zip
[NETFILTER]: xt_time should not assume CONFIG_KTIME_SCALAR
It is not correct to assume one can get nsec from a ktime directly by using .tv64 field. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/xt_time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/xt_time.c b/net/netfilter/xt_time.c
index ff44f86c24c..f9c55dcd894 100644
--- a/net/netfilter/xt_time.c
+++ b/net/netfilter/xt_time.c
@@ -170,7 +170,7 @@ static bool xt_time_match(const struct sk_buff *skb,
if (skb->tstamp.tv64 == 0)
__net_timestamp((struct sk_buff *)skb);
- stamp = skb->tstamp.tv64;
+ stamp = ktime_to_ns(skb->tstamp);
do_div(stamp, NSEC_PER_SEC);
if (info->flags & XT_TIME_LOCAL_TZ)