lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 6 Mar 2016 12:50:51 -0800 From: Stephen Hemminger <shemming@...cade.com> To: Phil Sutter <phil@....cc> CC: <netdev@...r.kernel.org> Subject: Re: [iproute PATCH] ifstat, nstat: fix daemon mode On Wed, 2 Mar 2016 16:56:27 +0100 Phil Sutter <phil@....cc> wrote: > Since the relevant code (and it's bugs) is identical in both files, fix > them in one go. This patch fixes multiple issues: > > * Using 'int' for the 'tdiff' variable does not suffice on 64bit > systems, the assigned initial time difference makes it wrap and > contain a negative value afterwards. Instead use the more appropriate > 'time_t' type. > > * As far as I understood the code, poll() is supposed to time out just > at the right time to trigger update_db() in the configured interval. > Therefore it's timeout must be set to the desired interval *minus* the > time that has already passed since then. > > * With the last change to the algorithm in place, it does not make sense > to call update_db() before returning data to the connected client. > Actually, it never does otherwise we could skip the periodic updates > in the first place. > > Signed-off-by: Phil Sutter <phil@....cc> Applied
Powered by blists - more mailing lists