Commit 53756524e42a71011f5ae6410d6ac386bf3a9e7b

Authored by Eric Dumazet
Committed by David S. Miller
1 parent 022cbae611

[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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

net/netfilter/xt_time.c
... ... @@ -170,7 +170,7 @@
170 170 if (skb->tstamp.tv64 == 0)
171 171 __net_timestamp((struct sk_buff *)skb);
172 172  
173   - stamp = skb->tstamp.tv64;
  173 + stamp = ktime_to_ns(skb->tstamp);
174 174 do_div(stamp, NSEC_PER_SEC);
175 175  
176 176 if (info->flags & XT_TIME_LOCAL_TZ)