Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53756524 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

[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: default avatarEric Dumazet <dada1@cosmosbay.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 022cbae6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)