From nobody Mon Mar 25 02:56:03 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 4V2yHR447cz5F63q; Mon, 25 Mar 2024 02:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V2yHR1ptwz476y; Mon, 25 Mar 2024 02:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711335363; 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=OsCz10D8ygEfALjSVCKc8jnDgJp/p/Rv5AaUw+7MuU8=; b=BRRyGjLsAZXUHsCyNuUtK28l+8ETW9kYNw8qp4ZLZrsTbwkEG/GxeuLuVtq7FF9nq6ype9 wQoEzI/I8t5xis3J8aSHpNzF9F/6R5Be5xDmJeRJIpvlxUXPjQvWech0hbQrunKo+lu/LL pQB1dLf31BSGDwydWbohFviAX7yl7O9KtgVhokY0ppLDc0rlGJrCWbqivKHh2WHv4piaE6 ketd3XrFo+TzOLE859fr38E6g6nFYX8+8HAcEh0texhlfyymvHPJTxBqax4xzvh5IYbhxI 5lhScYDkRFNPo3EyGWT2io1p+wJteSBXBIi+Nc1VcpSw4Yvh1f/YilOfcYfOvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711335363; a=rsa-sha256; cv=none; b=jxyTMt7s4CXfElYKdO6mpqnyIybxh16ZCEEHK05XrykArPGKJS+m2m2Tr+Xk5l6YfdUrlM t/LF6GHNkhnf3b6LI1GA1wpzFKxcZV/uMe52vJC07UCrRzB99q6dDBQPQFQ5BSK6cH8/o0 S1qlpmNzWOKklzfEMDbHVNUdFR8B9s9EaS9G2VZV5yMq9uwVjpkKwxuA7E41YYJso8YNfd 8ltwQHDjS/NQHnhkzCWSqcSQO4/LGc5C0dHCoS1fIYWhObWjv+Ysz5cjC5giYde/c28uLM +0EyflTQmDGoz6XWgrIPAZQtr7Bz0WOETgNOsXcwv+c2Au3wiJSiKycY6H7zww== 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=1711335363; 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=OsCz10D8ygEfALjSVCKc8jnDgJp/p/Rv5AaUw+7MuU8=; b=kpyjjqeNOc3h+AEhiwV32+0UN25dm7Wj4xbBnPX7zhzxhBosscAoMm2E5F8b+GhZdTLfsk 4PWWPo1qL4rUQu+/yugCUvJeq5NQJq3O6aEoPMoRP4vVQ+s+5aBwJsrNixS73Yf2Q4Wa9E X2KwwygJm54J+PoR7ClzGCsPrMn8nqDiYpM5ITGPOa0q9R0kYSNQnkrjS1qGrIW2K98zYC n6zHHiVZCLf1vXzlmqo+mRIDBT78D5jv6k6ldff/NQxj6DoRqkltR3puYfVNRRFXXLZp8n jG9V9dxFlzXT499HFTT/qDPFWdAXvgDTgF86N+XUQdegjjnnznnAjiWO1CBrwQ== 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 4V2yHR1QyZzyvl; Mon, 25 Mar 2024 02:56:03 +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 42P2u33q061558; Mon, 25 Mar 2024 02:56:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42P2u3Ro061555; Mon, 25 Mar 2024 02:56:03 GMT (envelope-from git) Date: Mon, 25 Mar 2024 02:56:03 GMT Message-Id: <202403250256.42P2u3Ro061555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 4399e055ea61 - main - 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4399e055ea610cdefa1470ad1ee614dd81ba5e56 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=4399e055ea610cdefa1470ad1ee614dd81ba5e56 commit 4399e055ea610cdefa1470ad1ee614dd81ba5e56 Author: Gleb Smirnoff AuthorDate: 2024-03-25 02:52:03 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-25 02:52:03 +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 --- 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 acb707b1d192..4dfbd0c525ff 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1135,7 +1135,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 ef4216b844b5..e56ec3bc7afd 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -2804,7 +2804,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;