netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [NET] netfilter : xt_time should not assume CONFIG_KTIME_SCALAR
@ 2007-11-13 11:30 Eric Dumazet
  2007-11-13 11:50 ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Dumazet @ 2007-11-13 11:30 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Patrick McHardy

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

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>



[-- Attachment #2: xt_time.patch --]
[-- Type: text/plain, Size: 435 bytes --]

diff --git a/net/netfilter/xt_time.c b/net/netfilter/xt_time.c
index ff44f86..f9c55dc 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)

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-11-14 19:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-13 11:30 [NET] netfilter : xt_time should not assume CONFIG_KTIME_SCALAR Eric Dumazet
2007-11-13 11:50 ` David Miller
2007-11-13 12:07   ` Patrick McHardy
2007-11-13 12:48     ` Eric Dumazet
2007-11-13 15:38       ` Patrick McHardy
2007-11-13 13:41   ` [NET] random : secure_tcp_sequence_number " Eric Dumazet
2007-11-14  5:13     ` David Miller
2007-11-14 19:49     ` [stable] " Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).