aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2007-11-13 06:49:53 -0500
committerDavid S. Miller <davem@davemloft.net>2007-11-13 06:49:53 -0500
commit53756524e42a71011f5ae6410d6ac386bf3a9e7b (patch)
tree3c168853549faee76be49b724d8da21a56a13ff2 /net
parent022cbae611a37eda80d498f8f379794c8ac3be47 (diff)
[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 ff44f86c24ce..f9c55dcd894b 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,
170 if (skb->tstamp.tv64 == 0) 170 if (skb->tstamp.tv64 == 0)
171 __net_timestamp((struct sk_buff *)skb); 171 __net_timestamp((struct sk_buff *)skb);
172 172
173 stamp = skb->tstamp.tv64; 173 stamp = ktime_to_ns(skb->tstamp);
174 do_div(stamp, NSEC_PER_SEC); 174 do_div(stamp, NSEC_PER_SEC);
175 175
176 if (info->flags & XT_TIME_LOCAL_TZ) 176 if (info->flags & XT_TIME_LOCAL_TZ)