From nobody Thu Sep 8 16:21:31 2022 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 4MNks73bFrz4cQpX; Thu, 8 Sep 2022 16:21: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 4MNks735tGz3V8h; Thu, 8 Sep 2022 16:21:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662654091; 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=Mda32Oh3Gi099KN6WSI1zV2tEDz2TjKQIhTqyUj7T20=; b=sbZ/oKMCZvBuwXrG3KVBN9Vfbt+BT+jpFBLMA8lpCCBB5OkS6CO3wffYeQFelmYy5IdF5u scFQow1vRQDA+DhUFmhcaebYJmDyDaRbFNbaRrr7d5aslPqaUuVQCP43ocgsxKfk6N0HAy 9wC7QTaYVcXMDAyZSsnQvp2T7xtnCxA5f89J7lkmIMd83EwobvEehZPPFnKEFVIP5AvlJF PpkXjbLo6QO3XAVlPUpjGWtccVy6XIW3ELDEY8uZFgmGUIXruA+zQ3V6c5lcsVs4YND+a5 lkixlWS/MbDtyRRIicm4pdN0KVcg6PURra3NXOi0kTLLqn5o3fNMFHntT15rLQ== 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 4MNks72BSQzwQG; Thu, 8 Sep 2022 16:21:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 288GLVa7085896; Thu, 8 Sep 2022 16:21:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 288GLV6m085895; Thu, 8 Sep 2022 16:21:31 GMT (envelope-from git) Date: Thu, 8 Sep 2022 16:21:31 GMT Message-Id: <202209081621.288GLV6m085895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: dda6376b04fc - main - net: employ newly added pfil_mbuf_{in,out} where approriate 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dda6376b04fc3698d2155dd83e61ea03e78ce5a5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662654091; 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=Mda32Oh3Gi099KN6WSI1zV2tEDz2TjKQIhTqyUj7T20=; b=g/9BYWiAzP7rcU0gKTT1CkI+eI6uNA6/bze2YmebKCMdcubPqug2qqIb+A2OLdVr+HUE7m AwVPX4Y06DqKOMmzzMtVDDBw9g252SaYHeOlIgeXlCAepdQppRYeUGONlIsE6k0UyNjnIl hHhJsUDLzF5yZkcT3Go4Zc0StYjqT8TbrEfm9VYUAvVpdgYCuIECAMv1CIzAp5YBLWYA6n 0eyQGFkAHbfOkZkikbxt8ofUZqOhvUJC1OnvQ4oDYVog3XDbmi+tj/bSbhiNkTXPkVzEyR qMXzzPc6FqgG1fdTpb1JOqTDCT92dEwuMCpJrnJgN/RZ9I/QUwZRupCENh0Big== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662654091; a=rsa-sha256; cv=none; b=wJgV1NAtGsmcBFy7XjRr4b7G/mB9XqrrZTaAvVUyBhrMlBReSGxlQfvmuBGIkF0jbtc5Ii cqiZhERZNGUU64dHOtrQZKWGs1tI5lppmOFR1kkFD0UGiL4QYzU7OlpX423xDsIWiLqFqq ZMhrHOvcvSlZkZwknCWmHs3Xu8e9sSJGCAwotCwP36xiYZGt/Q/7qyjp/s1MFHSVNu4evF jDLPdEhYlIQPiAxOVg21AkwpbWqr+YCi6Kq+0OjRyGUlET+CzkJiRQN8QF4DwrK0bJ1hCb PYL4rYYzde4FKMTIHQ5NBFOgU5bElGZR3OIglcmG3LSVizSZ4mCTgK8p1i17Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=dda6376b04fc3698d2155dd83e61ea03e78ce5a5 commit dda6376b04fc3698d2155dd83e61ea03e78ce5a5 Author: Mateusz Guzik AuthorDate: 2022-09-08 16:01:00 +0000 Commit: Mateusz Guzik CommitDate: 2022-09-08 16:21:08 +0000 net: employ newly added pfil_mbuf_{in,out} where approriate Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D36454 --- sys/netinet/ip_fastfwd.c | 6 +++--- sys/netinet/ip_input.c | 2 +- sys/netinet6/ip6_fastfwd.c | 4 ++-- sys/netinet6/ip6_forward.c | 2 +- sys/netinet6/ip6_input.c | 2 +- sys/netinet6/ip6_output.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index 33cd08a0005b..ee97cb4af65a 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -310,7 +310,7 @@ ip_tryforward(struct mbuf *m) if (!PFIL_HOOKED_IN(V_inet_pfil_head)) goto passin; - if (pfil_run_hooks(V_inet_pfil_head, &m, m->m_pkthdr.rcvif, PFIL_IN, + if (pfil_mbuf_in(V_inet_pfil_head, &m, m->m_pkthdr.rcvif, NULL) != PFIL_PASS) goto drop; @@ -402,8 +402,8 @@ passin: if (!PFIL_HOOKED_OUT(V_inet_pfil_head)) goto passout; - if (pfil_run_hooks(V_inet_pfil_head, &m, nh->nh_ifp, - PFIL_OUT, NULL) != PFIL_PASS) + if (pfil_mbuf_out(V_inet_pfil_head, &m, nh->nh_ifp, + NULL) != PFIL_PASS) goto drop; M_ASSERTVALID(m); diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index ead32d645acf..952b14943780 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -609,7 +609,7 @@ tooshort: goto passin; odst = ip->ip_dst; - if (pfil_run_hooks(V_inet_pfil_head, &m, ifp, PFIL_IN, NULL) != + if (pfil_mbuf_in(V_inet_pfil_head, &m, ifp, NULL) != PFIL_PASS) return; if (m == NULL) /* consumed by filter */ diff --git a/sys/netinet6/ip6_fastfwd.c b/sys/netinet6/ip6_fastfwd.c index 34c04f4ec683..e1c30629643e 100644 --- a/sys/netinet6/ip6_fastfwd.c +++ b/sys/netinet6/ip6_fastfwd.c @@ -164,7 +164,7 @@ ip6_tryforward(struct mbuf *m) */ if (!PFIL_HOOKED_IN(V_inet6_pfil_head)) goto passin; - if (pfil_run_hooks(V_inet6_pfil_head, &m, rcvif, PFIL_IN, NULL) != + if (pfil_mbuf_in(V_inet6_pfil_head, &m, rcvif, NULL) != PFIL_PASS) goto dropin; /* @@ -214,7 +214,7 @@ passin: /* * Outgoing packet firewall processing. */ - if (pfil_run_hooks(V_inet6_pfil_head, &m, nh->nh_ifp, PFIL_OUT, + if (pfil_mbuf_out(V_inet6_pfil_head, &m, nh->nh_ifp, NULL) != PFIL_PASS) goto dropout; diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index 03ecaf32b7b5..5173415afda6 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -313,7 +313,7 @@ again: odst = ip6->ip6_dst; /* Run through list of hooks for forwarded packets. */ - if (pfil_run_hooks(V_inet6_pfil_head, &m, nh->nh_ifp, PFIL_OUT, + if (pfil_mbuf_out(V_inet6_pfil_head, &m, nh->nh_ifp, NULL) != PFIL_PASS) goto freecopy; ip6 = mtod(m, struct ip6_hdr *); diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 70bacfb2436a..2407050f6905 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -731,7 +731,7 @@ ip6_input(struct mbuf *m) goto passin; odst = ip6->ip6_dst; - if (pfil_run_hooks(V_inet6_pfil_head, &m, m->m_pkthdr.rcvif, PFIL_IN, + if (pfil_mbuf_in(V_inet6_pfil_head, &m, m->m_pkthdr.rcvif, NULL) != PFIL_PASS) return; ip6 = mtod(m, struct ip6_hdr *); diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index a1504bfb8da6..617271f96407 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1014,7 +1014,7 @@ nonh6lookup: odst = ip6->ip6_dst; /* Run through list of hooks for output packets. */ - switch (pfil_run_hooks(V_inet6_pfil_head, &m, ifp, PFIL_OUT, inp)) { + switch (pfil_mbuf_out(V_inet6_pfil_head, &m, ifp, inp)) { case PFIL_PASS: ip6 = mtod(m, struct ip6_hdr *); break;