From nobody Wed Jun 26 04:50:28 2024 X-Original-To: dev-commits-src-all@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 4W88QY1KWCz5P0D0; Wed, 26 Jun 2024 04:50:29 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W88QX6DrQz57Tt; Wed, 26 Jun 2024 04:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377428; 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=ogSXz0J+9vDSvBoBnGUYSCZtBUFmAL5U/W+cOTMZQuw=; b=LmWONripUYSQJ4GQor+qj697u1YxcsK6v0drvrQJBySW4ED1DoNK+Jzw3S4vnAH9GaXu/6 4Hl/+4n0izJB3eozdu0bI8NZJSR+tESkfFjDV7J/OScpfZJt4R7GANJs4862N1JTRpRj3r uv0aTQgw93TW8MOUzn/GHDocMR2r/+i5E7wjz6yy1pwgKzeOByA95Lx7CJJrObQKnkdnuh c+n3hl0b4d8rSHhBmH2SFTdTS6WN7ZFmi8qybUo8WAYPI34GaEZuglkz10ZXO6nzmLAk8s sRO2JTDeHDz+Ny+c+7osnGBsUuioL909EOMc6cDlEEzZJ1nUAjkDjQRePHTxEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719377428; a=rsa-sha256; cv=none; b=L340gyEgqfvgJ4DErSy7qTIm5hawir96CQ9rYqYS2CQwxsJ+LlB3CScsVNEoS9W5bXV8Hn +/FGw98lkVGhYYOduWnNkJI8oLt1HlwBwbL7zC0foRV0OEzInHvK2lxffaeTWQ3f6Z1U04 pBfACTyB9Qa/7iwGlXwu/PlcLLCp4UXHGNa1Y6d+nyQIoS3+QRLSVdVSoUbdQ33aW/reD2 VrjqD6OAP4uKLhHV8CB1j5jRSavb9/qTWOFSEKmGmcrsue/T6aHrq5i3CMD/5Iq7MVOKHp eYtM7/P9suMZmS94N47srFOLfV2Ypgb9ktHNZXPS82xAkfhcCAthuv/PEz0bww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377428; 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=ogSXz0J+9vDSvBoBnGUYSCZtBUFmAL5U/W+cOTMZQuw=; b=V80hvl+4AawADZew06kRPjcKZQTQ3DHYZZddlIWNxu7oOOV+vPyCPiWxc5lRUqzFvQLChs fN+Pvcr2hFLaQi6uXz3MmQHz9RbTlUd2rtPqNp4iVEqYGS7QWQWb266QDvnvVHjksPnWNr Cv5yN2oLsM9lg8hZ4kJKKczfFangxtAgCujZonNkzPl+TabDSs6YkfX9auAwzcmUE3PUk+ 3+ZTghihqlHmvJaFG4LpE9advHGGarqchI4gGCh8rPxfz4+MdV+POyyfNflpcytkm26s5k XoSaxh1Av1aY20Uu8pjAlLdI/HQaUSgBQJ3xCtqAZgX6Pgp8/tg/1b/r/orHtg== 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 4W88QX5qsjzXBx; Wed, 26 Jun 2024 04:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45Q4oSl6063989; Wed, 26 Jun 2024 04:50:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q4oSU9063986; Wed, 26 Jun 2024 04:50:28 GMT (envelope-from git) Date: Wed, 26 Jun 2024 04:50:28 GMT Message-Id: <202406260450.45Q4oSU9063986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: d366b4931519 - stable/14 - icmp: allow zero value for ICMP limits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d366b4931519acf90a8e76d95356b0e4140aaf40 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d366b4931519acf90a8e76d95356b0e4140aaf40 commit d366b4931519acf90a8e76d95356b0e4140aaf40 Author: Gleb Smirnoff AuthorDate: 2024-03-25 02:52:03 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-26 04:48:44 +0000 icmp: allow zero value for ICMP limits Zero means limit is disabled, so the value doesn't need to be checked against jitter value. Fixes: ac44739fd834f51cacb26485a4140fd482e20150 Fixes: a03aff88a14448c3084a0384082ec996d7213897 (cherry picked from commit 4399e055ea610cdefa1470ad1ee614dd81ba5e56) --- sys/netinet/ip_icmp.c | 2 +- sys/netinet6/icmp6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index dcf387aa3c1c..67fb56dcdfa2 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1137,7 +1137,7 @@ sysctl_icmplim_and_jitter(SYSCTL_HANDLER_ARGS) error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr) { if (lim) { - if (new <= V_icmplim_jitter) + if (new != 0 && new <= V_icmplim_jitter) error = EINVAL; else V_icmplim = new; diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 4bce366c7ed4..c03c90e566c3 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -2806,7 +2806,7 @@ sysctl_icmp6lim_and_jitter(SYSCTL_HANDLER_ARGS) error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr) { if (lim) { - if (new <= V_icmp6lim_jitter) + if (new != 0 && new <= V_icmp6lim_jitter) error = EINVAL; else V_icmp6errppslim = new;