From nobody Tue Dec 21 23:38:03 2021 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 F13AA1903092; Tue, 21 Dec 2021 23:38:06 +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 4JJXvK10Nsz3rK6; Tue, 21 Dec 2021 23:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 A9C39130C2; Tue, 21 Dec 2021 23:38:03 +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 1BLNc3ps050274; Tue, 21 Dec 2021 23:38:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BLNc35J050273; Tue, 21 Dec 2021 23:38:03 GMT (envelope-from git) Date: Tue, 21 Dec 2021 23:38:03 GMT Message-Id: <202112212338.1BLNc35J050273@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 616a2e8312fd - stable/12 - ipfilter: Fix struct ifnet pointer type 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 616a2e8312fd167473202e18b8771f6902b2f45b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640129885; 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=50OhLSbDPC71cWctG9IiMPDLeP1qyz/L0xTKj7cfvLM=; b=R4rMbmXotjhzgOZVRtrU/j4PB6oGc+7b36ycRhAM+diS/4S9xHtevKrVNmSlQCm6v5xyv8 SyAYqahgMNYFLy0QvX5k0Sz/Ifg1UgpTyYJQEU/OdTGjN+lpBgiSH5yM1FrTB3UBC2CmYe RmMQ0Bg1UmZOpcrEQPJrwXaDkG14mRTM0wg3QI/ICfidQtM8gDqDtiynkkMYE7jy8QmPy9 1oSiPPxM3maomatqywEq8Qjqe8oEQS60Oq7xHxDGMznt6OuWBL2D6O5qwpghBGNFUl2gjP nEfmZL9gYvxzyJ8RBtaAMV/3Tx1v3aohpUEnvVPP4GyTdAKwu9agqqzi41z6dQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640129885; a=rsa-sha256; cv=none; b=RKhYumepAcbrgJ3kquxbTkctbbeMzZQFjEWCODMoAYpEPQOhEMivv3bRYlVycUYJqOmBV4 bjGyqyticsOiK5OG5K0QNFq7eujSiQLN9td4yobMehVidFLEZo5n9rhD2fixYoL7vAD0b1 ctbPRD7mMAnDhn2/kk59HODBdAuyvziZTOPfEPY0XEB/75ZHpNXsJJpv3TdHqS5DFeH10h lZFhZUnVtUUQNNKAzMECwHgrgshbdKncQRhokBN/8ZFC9/w4FyHkT2Dc/X/zNO+czcz7kE NHHNv+oJn+h1WWlqRbKwPyqEcHhpvX4tq7XFk2Fg13q5A1LhCvGLf9w8eJx49g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=616a2e8312fd167473202e18b8771f6902b2f45b commit 616a2e8312fd167473202e18b8771f6902b2f45b Author: Cy Schubert AuthorDate: 2021-12-12 23:57:36 +0000 Commit: Cy Schubert CommitDate: 2021-12-21 23:37:25 +0000 ipfilter: Fix struct ifnet pointer type The fr_info struct contains a summary of a packet. One of its fields is a pointer to the ifnet struct the packet arrived on. It is pointed to by a void* because ipfilter supports multiple O/Ses. Unfortunately this makes it difficult it examine with DTrace. Defining fin_ifp as a pointer to an ifnet struct makes the struct it points to using a DTrace script possible. (cherry picked from commit 8f19f3d31a7224c502c36dd16f1321b802e4da60) --- sys/contrib/ipfilter/netinet/ip_fil.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 8cb988e1fd17..be8e023ac0ba 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -358,7 +358,11 @@ typedef enum ipf_cksum_e { typedef struct fr_info { void *fin_main_soft; +#ifdef __FreeBSD__ + struct ifnet *fin_ifp; /* interface packet is `on' */ +#else void *fin_ifp; /* interface packet is `on' */ +#endif struct frentry *fin_fr; /* last matching rule */ int fin_out; /* in or out ? 1 == out, 0 == in */ fr_ip_t fin_fi; /* IP Packet summary */