From nobody Thu Sep 19 20:21:25 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 4X8n3T6pWYz5XKy8; Thu, 19 Sep 2024 20:21:25 +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 4X8n3T4tJ6z4XCw; Thu, 19 Sep 2024 20:21:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726777285; 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=TuoB/NuIXQ0aXL79ahXxF28a0DLe0y03ufVmWybex6E=; b=mtv+AdzkyiPeeeHu+nnDb6XXqtuz+LU9bukelQtYgQXrz/Dm1dKobSNen3ityJRZKE8A9I Tz9P/3FgJ3gufKB9kiBurBB1Xmv0+VeaUA//mSJOGGzkJR6DuGUt8poL7TVd50oakdSbyq GdeaH10psGpKXf0XtiX+YeggI/rqBLmWLu2hvlsEXYqZBP0R9yho10zGFE9GZxrb/u0NFz uxEXyUkmNXRhLaROL2HV/8TmUlKnZTistEFvd+O1vBX3ivWF9VkCjcqSJpB/ED+F99oEeu bbq6REA/1fDztyYV2d0bDCg3dwfviKNsAE8PNvPzfDDstFWF1KQNDsL5tj45Wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726777285; a=rsa-sha256; cv=none; b=mdqao0LdYn5cJZaFtvfHER63+UlzVeDhCIRdN4nhOD8tVpOBP/NuSVmDrPjml9Bq60o2dL sTPcWTGNG6ln8U5t3HEhX3sjQrWxdbekTR8jvCm79SXYrE21TYx9edgidJwNH3jadhlILf BSS7K7vIuFEK80oVqKBPS9/PovlmlJO2QpzRLI5bwcSr9ftVw+22sg4UBzo34K5dv8J01L hAWJOKZoGATlPIj3F1oIquVLVYJoU5otFAy4A++WawtKaIbMKZr6ieNGbQxZQySG9P+z2r v7R5uX2X4TdLDp04GgFNH/zAx6/W9jisgbvtHyhdJxL7y5OhbWIa3IhBjF1veA== 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=1726777285; 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=TuoB/NuIXQ0aXL79ahXxF28a0DLe0y03ufVmWybex6E=; b=RZyEiydbydvuGOs6tO4Y+joQZHfhFPuZEZK4pV3Za+V28aFcfCO6kK9obxMqapUrSEsHnf 0cw2d+bDuulDUzrD+/48nesByWJ844JVq37Kb8nTDvqBQ00jhISoLpBsHaA4JfoZElYyQS ZySiOTjA7R0VeV+v99aB13/ipjmEloBeRyKsy1J7eq9kKVpbKkOGL/cXwPzzhdp7LXnKTd VjrHNFblu5V66+Va1U+WFduzC0rZif8fd8CoveyPKQe+2+ppn716aZK/dxfxntiSiT2UT6 9C3CjLCkehwKswKv/arEML4QrA6OjlivGL936gfXFgsUewHG11SiQ0IkGnYEWg== 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 4X8n3T4CJNzL2v; Thu, 19 Sep 2024 20:21:25 +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 48JKLPUK046695; Thu, 19 Sep 2024 20:21:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48JKLPIH046692; Thu, 19 Sep 2024 20:21:25 GMT (envelope-from git) Date: Thu, 19 Sep 2024 20:21:25 GMT Message-Id: <202409192021.48JKLPIH046692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b450a0f928d6 - main - pf: remove unneeded double pointer to pf_scrub_ip(6)() 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b450a0f928d640f823ba31779cd492e7d5d1c38c Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b450a0f928d640f823ba31779cd492e7d5d1c38c commit b450a0f928d640f823ba31779cd492e7d5d1c38c Author: Kristof Provost AuthorDate: 2024-09-04 15:19:44 +0000 Commit: Kristof Provost CommitDate: 2024-09-19 20:20:14 +0000 pf: remove unneeded double pointer to pf_scrub_ip(6)() pf_scrub_ip() does not modify the given mbuf pointer. So don't pass a pointer to a pointer to make the code in pf_test() clearer. ok henning@ Reviewed by: zlei Obtained from: OpenBSD, bluhm , aac78b59b9 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46593 --- sys/net/pfvar.h | 4 ++-- sys/netpfil/pf/pf.c | 4 ++-- sys/netpfil/pf/pf_norm.c | 6 ++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 9a0130dbf487..8335fbfaedb8 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2641,10 +2641,10 @@ void pf_rule_to_actions(struct pf_krule *, int pf_normalize_mss(struct mbuf *m, int off, struct pf_pdesc *pd); #ifdef INET -void pf_scrub_ip(struct mbuf **, struct pf_pdesc *); +void pf_scrub_ip(struct mbuf *, struct pf_pdesc *); #endif /* INET */ #ifdef INET6 -void pf_scrub_ip6(struct mbuf **, struct pf_pdesc *); +void pf_scrub_ip6(struct mbuf *, struct pf_pdesc *); #endif /* INET6 */ struct pfi_kkif *pf_kkif_create(int); diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index c85c2e784cd9..916657c7af15 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9221,7 +9221,7 @@ done: REASON_SET(&reason, PFRES_MEMORY); } - pf_scrub_ip(&m, &pd); + pf_scrub_ip(m, &pd); if (pd.proto == IPPROTO_TCP && pd.act.max_mss) pf_normalize_mss(m, off, &pd); @@ -9676,7 +9676,7 @@ done: REASON_SET(&reason, PFRES_MEMORY); } - pf_scrub_ip6(&m, &pd); + pf_scrub_ip6(m, &pd); if (pd.proto == IPPROTO_TCP && pd.act.max_mss) pf_normalize_mss(m, off, &pd); diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index aaeb027ca8bd..8bc9bb4914db 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -2269,9 +2269,8 @@ sctp_drop: #ifdef INET void -pf_scrub_ip(struct mbuf **m0, struct pf_pdesc *pd) +pf_scrub_ip(struct mbuf *m, struct pf_pdesc *pd) { - struct mbuf *m = *m0; struct ip *h = mtod(m, struct ip *); /* Clear IP_DF if no-df was requested */ @@ -2313,9 +2312,8 @@ pf_scrub_ip(struct mbuf **m0, struct pf_pdesc *pd) #ifdef INET6 void -pf_scrub_ip6(struct mbuf **m0, struct pf_pdesc *pd) +pf_scrub_ip6(struct mbuf *m, struct pf_pdesc *pd) { - struct mbuf *m = *m0; struct ip6_hdr *h = mtod(m, struct ip6_hdr *); /* Enforce a minimum ttl, may cause endless packet loops */