From nobody Sat Dec 28 23:33:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YLJZR3STJz5jNyP; Sat, 28 Dec 2024 23:33:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YLJZR2msDz4Jbj; Sat, 28 Dec 2024 23:33:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735428783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bLZb2mfSAePu6bkyKGfRGG+D9e3+L+K5lRt6oiBZfI4=; b=x3Up1opp2L0fG5ZKWyV7MGALqPUoL1kVPIXJZxOvDHHe9tdA7JwbUis+6w7vXHuPQkDIYm Wc69/pNVkqQwP4TOr+4P9M6dVw28D96bLsMao4b/HQWWGxAuymRE9bMQdcfYFPZvRi+MQi 3hCSlpebH0Fm/k7UlKt2CepCP/eHm1qL0K0R4lASOKSj0UuI/n4xns3E73+q6oiOkWsc9I +5xC7raw6n+oIpI9C2n3vRUZ1RHJOOgJ0NbyeRYsE3BpfcUb5AuguoqGC+QT8S312Nq4Fn ZkDG+feCWHc6frLOfiY6MZ+HSH51QtYMP3kI81Ael8Xt6rGzhmFwZ13DwTOhRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735428783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bLZb2mfSAePu6bkyKGfRGG+D9e3+L+K5lRt6oiBZfI4=; b=qMokco1nN0VCz9+c7Lv+SeI+poPFPVwcmfeo3rjMFHJartW9xNyZIpG1+91JM2nPD/hW7D QGobF9M13WaNqqPa31dvV4KZN9l3u3RCmi/3dTocM/Op7vYfmhovCV7fKIPwC84A6KJW0Z o8F9Kp+bfssTZkOpm0v4tSDJ4UhG5kWsLv/riREGZbPw/+JTfcwnwSV2TG5DaHbGnJu4AL J4saDrm/57FGSHwAcbUOy+XC764jTUfjjBeTDwBQKOvLMR6vXu0xuy21aerPUFfYFLYTiv ROxQltgxkCIlZfkXHyHpEIcpyRYP0wIt/l9BDHFdzo9aYUFb8tWWSGdjKwYpHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735428783; a=rsa-sha256; cv=none; b=RCtxmHoMNMkz0O+DQoSuC6lZUpRdGlHnuU5jvAJ2sp2SrxOJYmBIxCEp1FZKIF5rJBqY4S CTe0e5+Scd8aHKMEf/CjL2jisZl/aaM4fVsMHHO/Fkzaed6UDDda5y/fMjOrExtl+vpluO 9raufvA6ym4A25D7uNH6gBuK0eTdTfNaQn1dXmq6V7d/rod3VQ+dm2C++yLguLyRXtO+c/ Fv0N4lsmdp9teMTU1769RlrCJjg4MIRxt98UGxyG2hMQizVXdrO/9lpNBLmHt3UyXt5/nr 48kXHX93E5K7k2T00PNgRqN2HU4OlcMzszAzAUNGxblukMnn/E2vvGM/ccZ4xA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YLJZR2NhYzl0l; Sat, 28 Dec 2024 23:33:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BSNX3Ho062537; Sat, 28 Dec 2024 23:33:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BSNX3tc062532; Sat, 28 Dec 2024 23:33:03 GMT (envelope-from git) Date: Sat, 28 Dec 2024 23:33:03 GMT Message-Id: <202412282333.4BSNX3tc062532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Konovalov Subject: git: 39d3c81c43c7 - main - ping: correct minimal payload size for the sweep ping List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39d3c81c43c794aab00fbde9b4079749e6a08f6f Auto-Submitted: auto-generated The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=39d3c81c43c794aab00fbde9b4079749e6a08f6f commit 39d3c81c43c794aab00fbde9b4079749e6a08f6f Author: Maxim Konovalov AuthorDate: 2024-12-28 21:10:04 +0000 Commit: Maxim Konovalov 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);