diff options
author | Petr Vorel <pvorel@suse.cz> | 2024-01-16 21:12:34 +0100 |
---|---|---|
committer | Petr Vorel <petr.vorel@gmail.com> | 2024-01-17 11:14:42 +0100 |
commit | 7a514946c85ebfb3d12428ed1991262ac3dfc724 (patch) | |
tree | 28e04b3b45ebe43aa23c21dd4c42fac7e8679922 | |
parent | 056bf444419c56686c6390a8366de80921c96df5 (diff) | |
download | iputils-7a514946c85ebfb3d12428ed1991262ac3dfc724.tar.gz |
ping: Restore -i0
-i 0 has been supported for a long time, restore it back.
There is no point to force user to set very minimal value to emulate 0.
Found by LTP tests (nft01.sh, iptables01.sh) which use it.
Fixes: 2a63b94 ("ping: Fix overflow on negative -i")
Closes: https://github.com/iputils/iputils/pull/519
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
-rw-r--r-- | ping/ping.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ping/ping.c b/ping/ping.c index 4ad08c2..29ac1be 100644 --- a/ping/ping.c +++ b/ping/ping.c @@ -441,7 +441,7 @@ main(int argc, char **argv) double optval; optval = ping_strtod(optarg, _("bad timing interval")); - if (islessequal(optval, 0) || isgreater(optval, (double)INT_MAX / 1000)) + if (isless(optval, 0) || isgreater(optval, (double)INT_MAX / 1000)) error(2, 0, _("bad timing interval: %s"), optarg); rts.interval = (int)(optval * 1000); rts.opt_interval = 1; |