Allow minimum and maximum sweep size be the same.

Submitted by:	maxim
This commit is contained in:
Gleb Smirnoff 2016-03-11 21:06:17 +00:00
parent 3b2bb13317
commit bb7dfe5e49
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296683

View file

@ -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");