From nobody Mon Dec 13 14:25:36 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 DDAAC18D9F16; Mon, 13 Dec 2021 14:25:36 +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 4JCP1X4GGXz3LNg; Mon, 13 Dec 2021 14:25:36 +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 73DEB1649B; Mon, 13 Dec 2021 14:25:36 +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 1BDEPaV2081393; Mon, 13 Dec 2021 14:25:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BDEPaNV081392; Mon, 13 Dec 2021 14:25:36 GMT (envelope-from git) Date: Mon, 13 Dec 2021 14:25:36 GMT Message-Id: <202112131425.1BDEPaNV081392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 8f19f3d31a72 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 8f19f3d31a7224c502c36dd16f1321b802e4da60 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639405536; 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=OGBRwBlE88tYeKBjScTVWiE+W1U0wflNvQMaeMlz9+o=; b=AU9LN5Uh1tQXUQt5gC2EY+FE4RMhhxixt2kOPYA/X32rhvXvszdEr++jg2NVitqx4yFk2a JuJKN2QNsE1uVd7Pk6qIICksROl5dWqhP9+KNKucyg/LDNMreNF25o2QtwoXaMY4x1/FpT x3h2S0cwW30flbJTUw+UfuiR/Na1RDV5LblVAwY8blK4bsuUyFUM49OgAYFkahAlRF7Fa1 lMK+kmw0BiEaosXpX3jOO3VqGwPUNDzRgnVM2aByxxOGSZQCrPvmlfYm/QkgIc0AitHxP0 qYaF9Jj6pbcbVFVqlT/WJ8dciQpbzNo3pZd16WJ22zf5fe6rvcrLMLth1slb6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639405536; a=rsa-sha256; cv=none; b=FNhh7S6gJk1wngC4g8j/2QODkwP4Oz1nTH2kAK2XARAZSMUdd6hHAPIsqTHf5k23vXWnNg Qf7mv7kC7HXVif1USu5jgH7V8cMiF26niS0+T0OFcNNIfjYry3aO+u3gvdOpJrNOcw+mgd sr9G3F4q8xLSOWh4QbO7DnGk6TtoJPWKp3Q6QyLLOt9pL0GFCDi4zlxYh4tsmMtpf2WT9j wMupMCIgKmof2zoGLlmPDwTvygdxKYK3+9Pono0moC5m2ZYp32eJ9aesdstcoAS9aShEny F4B9Fd8CpDg9jd1WAQITSaU33OVlmXyn2Sk1rqpo2mPMM0WDa9yrwxMmT/ZA+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=8f19f3d31a7224c502c36dd16f1321b802e4da60 commit 8f19f3d31a7224c502c36dd16f1321b802e4da60 Author: Cy Schubert AuthorDate: 2021-12-12 23:57:36 +0000 Commit: Cy Schubert CommitDate: 2021-12-13 14:24:50 +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. MFC after: 1 week --- 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 7e976d88cc0f..a01bd28e7270 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 */