Skip to content

Commit 280763c

Browse files
dhowellsdavem330
authored andcommitted
netfilter: xt_time: fix time's time_mt()'s use of do_div()
Fix netfilter xt_time's time_mt()'s use of do_div() on an s64 by using div_s64() instead. This was introduced by patch ee4411a ("[NETFILTER]: x_tables: add xt_time match"). Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5840157 commit 280763c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/xt_time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ time_mt(const struct sk_buff *skb, const struct net_device *in,
173173
__net_timestamp((struct sk_buff *)skb);
174174

175175
stamp = ktime_to_ns(skb->tstamp);
176-
do_div(stamp, NSEC_PER_SEC);
176+
stamp = div_s64(stamp, NSEC_PER_SEC);
177177

178178
if (info->flags & XT_TIME_LOCAL_TZ)
179179
/* Adjust for local timezone */

0 commit comments

Comments
 (0)