summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorcheloha <cheloha@cvs.openbsd.org>2018-02-13 17:35:33 +0000
committercheloha <cheloha@cvs.openbsd.org>2018-02-13 17:35:33 +0000
commit6ee0b6e9443667bd74f5f7c2a6a2af4dd0719a1f (patch)
tree2b812ce5b6e6ad144641640b77f79207c8915fea /usr.sbin
parenta86ef32701b21fe0f03f023bf9d414f0245936cc (diff)
Normalize handle limit timeval in microsecond (usec) case.
Makes stuff like limit 1500000 usec work correctly. ok millert@ tb@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/hostapd/parse.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/hostapd/parse.y b/usr.sbin/hostapd/parse.y
index eff199d93a1..3d5254907de 100644
--- a/usr.sbin/hostapd/parse.y
+++ b/usr.sbin/hostapd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.53 2017/01/05 13:53:09 krw Exp $ */
+/* $OpenBSD: parse.y,v 1.54 2018/02/13 17:35:32 cheloha Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Reyk Floeter <reyk@openbsd.org>
@@ -500,7 +500,8 @@ limit : /* empty */
yyerror("limit out of range: %lld usec", $2);
YYERROR;
}
- frame.f_limit.tv_usec = $2;
+ frame.f_limit.tv_sec = $2 / 1000000;
+ frame.f_limit.tv_usec = $2 % 1000000;
}
;