From nobody Wed Feb 12 10:28:16 2025 X-Original-To: dev-commits-src-branches@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 4YtDzh4P46z5mXsG; Wed, 12 Feb 2025 10:28:16 +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 4YtDzh3mZ9z3Zrj; Wed, 12 Feb 2025 10:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739356096; 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=xieCK7mZ3ET/edwoCW0j4rmte8cqsRXae4VHPNDdOTM=; b=t3NJGFUZAHjADFmj9XQ5/X2tzisGUZcOyHxNpa7tsQaiSFoN1ZT6HF22kbTa3EBPtHbRzQ UQk41ZeZIUCSeMY0c1MQ597HURWkGwUGY+gpumQ+pxVREkOtgGcaLzlXAm6Jxccr/eNf7d ImhRRG+p9CYGicgcP68uovIjw3NfFFm3KZLszyJNCguOpEijG+ckEAvN2BBjGShHbasyMO h7d1jvMakbDFnnF4Xv0/EybnSgtljpPUT+c9eNE4lD+UMEXjxAuoijahLUUpqwgRSWgYYy Uu1DnHbevqQoV14u2vg2Oq+2GgemmIqHWnD5VTFHLAP71ShZdTO3z9Tkv63ebQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739356096; 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=xieCK7mZ3ET/edwoCW0j4rmte8cqsRXae4VHPNDdOTM=; b=PfRUQHQT8AtNuIg6j5JUwHfoPXK9cwhiO+3F8IUA1tmKXAnEl0DXkudXXOrfwzX8hRsc15 PD8faNAdZAzPxTf+cMs/DSRKHpR7HVYC0y+eLs2g7J1/Iq0KEEgiuVua9a+013+PB9GTZJ nyGCjtktMUHC02yZvJYMOC6TXTgz9h6NfSSv9N0MWnI+gvdbpo6CBM6hhbZDo3hBueAUNi ShG3hvIDZfAUZwh0z4+FDRv99Hk22jWtWI9O0Z/6G83DXZyGzKmw439PLm9wh4ec8fOloB n8n5qXdzv8xHEavr66Y4LW29r8qvSCplkuZ6TPqpNXoX1dFF39hWpmcx9rNrTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739356096; a=rsa-sha256; cv=none; b=SwZ9upzymNj58MZTP/szDLZftuAbWPPS84riGFaOiGehbP7Mt8idaCrBmPcjyRZy392Meo dnVibpLVB5WjLAQD01/hQf+hqEoswa3eibMX1J5F/5ygZwEJH4zj43pjOuwn23LYUhXBvM Y8IDCJ2J3Gp9nTWdoZD3R/HCJAW0yvUNebGGJ6Tx+1IlEDq7bSkNp7lJ9+KDBUtbu7fUEj a8Ms9OtEZaeOB7rRuXfsQ/HmqQkW3omVE8+jZx4SsOvyL50HxZFuU7MiDtrneM+eQHyXPP FQj7/EAWlh78ise+Wmna2Fzf6xb+PMwhWIptrZ1IJTsqdmH/mRa6YD6fdAFUcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YtDzh3Ht8zvxg; Wed, 12 Feb 2025 10:28:16 +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 51CASG8V031149; Wed, 12 Feb 2025 10:28:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51CASGPT031146; Wed, 12 Feb 2025 10:28:16 GMT (envelope-from git) Date: Wed, 12 Feb 2025 10:28:16 GMT Message-Id: <202502121028.51CASGPT031146@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: dc167e64dce3 - stable/13 - icmp6: make icmp6_ratelimit() responsible to update the stats counter List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dc167e64dce3ffc212e4f7a2268587abcc22c036 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=dc167e64dce3ffc212e4f7a2268587abcc22c036 commit dc167e64dce3ffc212e4f7a2268587abcc22c036 Author: Gleb Smirnoff AuthorDate: 2024-03-24 16:13:23 +0000 Commit: Michael Tuexen CommitDate: 2025-02-12 10:27:12 +0000 icmp6: make icmp6_ratelimit() responsible to update the stats counter Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D44479 (cherry picked from commit c6c96aaba8dd74eb39469ed156ff19cc31d599b7) --- sys/netinet6/icmp6.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index d49c3856be1a..258f4bed794e 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -346,10 +346,8 @@ icmp6_error(struct mbuf *m, int type, int code, int param) } /* Finally, do rate limitation check. */ - if (icmp6_ratelimit(&oip6->ip6_src, type, code)) { - ICMP6STAT_INC(icp6s_toofreq); + if (icmp6_ratelimit(&oip6->ip6_src, type, code)) goto freeit; - } /* * OK, ICMP6 can be generated. @@ -2799,6 +2797,7 @@ icmp6_ratelimit(const struct in6_addr *dst, const int type, V_icmp6errppslim)) { /* The packet is subject to rate limit */ ret++; + ICMP6STAT_INC(icp6s_toofreq); } return ret;