diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2007-11-13 06:49:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-11-13 06:49:53 -0500 |
commit | 53756524e42a71011f5ae6410d6ac386bf3a9e7b (patch) | |
tree | 3c168853549faee76be49b724d8da21a56a13ff2 | |
parent | 022cbae611a37eda80d498f8f379794c8ac3be47 (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>
-rw-r--r-- | net/netfilter/xt_time.c | 2 |
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) |