diff options
author | Cy Schubert <cy@FreeBSD.org> | 2021-12-12 23:57:36 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2021-12-13 14:24:50 +0000 |
commit | 8f19f3d31a7224c502c36dd16f1321b802e4da60 (patch) | |
tree | 95a344fd09e6bacbede8bc00abd06821dae88f21 /sys/contrib/ipfilter/netinet | |
parent | 8b37048bc5482ffe46404dbe6311f0530d2c150b (diff) | |
download | src-8f19f3d31a7224c502c36dd16f1321b802e4da60.tar.gz src-8f19f3d31a7224c502c36dd16f1321b802e4da60.zip |
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
Diffstat (limited to 'sys/contrib/ipfilter/netinet')
-rw-r--r-- | sys/contrib/ipfilter/netinet/ip_fil.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 */ |