From bb7dfe5e498ce7e73612743680c4c9a08ac450ce Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Fri, 11 Mar 2016 21:06:17 +0000 Subject: [PATCH] Allow minimum and maximum sweep size be the same. Submitted by: maxim --- sbin/ping/ping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 1fc196376e8..a5f86027138 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -793,8 +793,8 @@ main(int argc, char *const *argv) } #endif if (sweepmax) { - if (sweepmin >= sweepmax) - errx(EX_USAGE, "Maximum packet size must be greater than the minimum packet size"); + if (sweepmin > sweepmax) + errx(EX_USAGE, "Maximum packet size must be no less than the minimum packet size"); if (datalen != DEFDATALEN) errx(EX_USAGE, "Packet size and ping sweep are mutually exclusive");