提交 53756524 编写于 作者: E Eric Dumazet 提交者: David S. Miller

[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: NEric Dumazet <dada1@cosmosbay.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 022cbae6
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册