From: Eric Dumazet Date: Tue, 13 Nov 2007 11:49:53 +0000 (-0800) Subject: [NETFILTER]: xt_time should not assume CONFIG_KTIME_SCALAR X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=53756524e42a71011f5ae6410d6ac386bf3a9e7b;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [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 Signed-off-by: David S. Miller --- 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, 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)