From nobody Sun Mar 24 16:19:31 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 4V2h8z4xsNz5G0Fn; Sun, 24 Mar 2024 16:19:31 +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 4V2h8z3WbJz4G79; Sun, 24 Mar 2024 16:19:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711297171; 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=RbnjxlEK5YSO+3c7+c+yZDeGuIrdkbVYgKz64NOMKTE=; b=HRtyIsl4XKK58nUzjh+fd+trmukamkWOP4lojny4O2pa8fx5zi6Nk66/Dm8+Lksv2DTjdS 2L0LU3Yi6b1xHAKPOoKAbXPPYo79BB6ImFpnpOKEr9W2btwI1D5/Dn6rGKI5nSRUUzoU6j 0kQOMQpsIQ+SmUEAyUndQHjEYhk2kGR3ArC4To/jCxGr+DdBABJsfcw4TJabNtoohkmU5t uJ8pkXibsfuLBbpBySKOWh2FyCr3J9ePRistgpqlptQ+Q9m29EqS74iErTB5MfcCULxFMA 0gHZyKl8jXqLQJQn564N/xKGgnXEc+nBVrTC26Emuq4q1z3WPKuG7jJdss3SCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711297171; a=rsa-sha256; cv=none; b=AgZgNROIUhk1imKC1wZkUyU5ugZh2auYe40Wo+9d/3g4GNLxEcrpKuUY0W6jY2r3idRqt1 DFMazUYRgn0rS4t2ntLY4i/enyA11fPijNA03LpHFSAKW5WcNwyjHfNS0oR1j4G/goJcBV EnumIKuCQ4n0BD7gEXNyHteCpKJYEhvkfyUJqQ6viWnh96LzWfYX/hR21MYH02d5p0R0Dh yDQnyJO6BTvwmpxVjqjdzrm6yghtCSOD14GTmC/cHT486+i53Dfr3IY9KGeCbDkMYsnwKP 3EoABdgEhycYLwj78lCXjSml1KyjbeX2xr1kksLsm/Nt4CiGD1CTTEfVd2C1JQ== 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=1711297171; 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=RbnjxlEK5YSO+3c7+c+yZDeGuIrdkbVYgKz64NOMKTE=; b=i+4XgPeTRmbXLgEZ2a0/idLxo4TIDfuqQ4uO+yGJvUGbHzl4lu+nH2wGfrjCq/HGqlEqe2 u+t0TydvNx9jN4fbz4qeGHaiiVVfF0CPBPCBLmwZ+cncPd+KXm4yZbZ5Ma72nJhhosYl41 sfTn24X9vAeScnXUtPXIvAgd/uX0zGApF2LYx6Ak5w97RMF8zeS7/4IPHNnNAAr0Za9Fqf u+RbibYe57GcxzdgXUjdTCO8tE9GpLnfZHcLHEYwqhW5zjKV8/ZyRlvCHVl1fFSqPRAd7/ szLW6TtovqGvaVMob9itzbvQOaxLydgs0jp6kU6P6wvCM9pmoyCl8rEncUzCUw== 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 4V2h8z35H6zfsr; Sun, 24 Mar 2024 16:19:31 +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 42OGJVnr079508; Sun, 24 Mar 2024 16:19:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42OGJVie079505; Sun, 24 Mar 2024 16:19:31 GMT (envelope-from git) Date: Sun, 24 Mar 2024 16:19:31 GMT Message-Id: <202403241619.42OGJVie079505@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: c6c96aaba8dd - main - icmp6: make icmp6_ratelimit() responsible to update the stats counter 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: c6c96aaba8dd74eb39469ed156ff19cc31d599b7 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=c6c96aaba8dd74eb39469ed156ff19cc31d599b7 commit c6c96aaba8dd74eb39469ed156ff19cc31d599b7 Author: Gleb Smirnoff AuthorDate: 2024-03-24 16:13:23 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-24 16:13:23 +0000 icmp6: make icmp6_ratelimit() responsible to update the stats counter Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D44479 --- 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 671fb91da4bf..260f5c7e2467 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -341,10 +341,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. @@ -2744,6 +2742,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;