Date: Sat, 28 Dec 2024 23:33:03 GMT From: Maxim Konovalov <maxim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 39d3c81c43c7 - main - ping: correct minimal payload size for the sweep ping Message-ID: <202412282333.4BSNX3tc062532@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=39d3c81c43c794aab00fbde9b4079749e6a08f6f commit 39d3c81c43c794aab00fbde9b4079749e6a08f6f Author: Maxim Konovalov <maxim@FreeBSD.org> AuthorDate: 2024-12-28 21:10:04 +0000 Commit: Maxim Konovalov <maxim@FreeBSD.org> CommitDate: 2024-12-28 23:32:31 +0000 ping: correct minimal payload size for the sweep ping The -g flag specifies a minimal payload size for the sweep ping and its default is zero. Make it possible to do ping -g 0 ..., i.e., start with no payload. Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D48231 --- sbin/ping/ping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index d9d544bc75c8..c11113fdd72d 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -328,7 +328,7 @@ ping(int argc, char *const *argv) options |= F_SWEEP; break; case 'g': /* Minimum packet size for ping sweep */ - ltmp = strtonum(optarg, 1, INT_MAX, &errstr); + ltmp = strtonum(optarg, 0, INT_MAX, &errstr); if (errstr != NULL) { errx(EX_USAGE, "invalid packet size: `%s'", optarg);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202412282333.4BSNX3tc062532>