Skip to content

Commit 1ea9e3b

Browse files
committed
pflogd: Work around fallout from libpcap 1.10.5
struct pcap_timeval and pcap_sf_pkthdr are no longer exposed. Add local declarations as done for racoon/dump.c. Note that pcap_timeval:tv_{,u}sec are converted to unsigned for 1.10.5, without changing header magic number. These are already unsigned for racoon/dump.c somehow... XXX There's no ATF/regress test for pf, and this patch is totally untested.
1 parent 5c92968 commit 1ea9e3b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

dist/pf/sbin/pflogd/pflogd.c

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: pflogd.c,v 1.12 2023/08/19 14:56:22 christos Exp $ */
1+
/* $NetBSD: pflogd.c,v 1.13 2024/09/03 09:03:18 rin Exp $ */
22
/* $OpenBSD: pflogd.c,v 1.45 2007/06/06 14:11:26 henning Exp $ */
33

44
/*
@@ -107,6 +107,20 @@ static size_t bufleft = 0; /* bytes left in buffer */
107107
static int suspended = -1;
108108
static long packets_dropped = 0;
109109

110+
/*
111+
* XXX Taken from libpcap. These are no longer exposed for >= 1.10.5,
112+
* for which tv_{,u}sec were converted to unsigned.
113+
*/
114+
struct pcap_timeval {
115+
uint32_t tv_sec;
116+
uint32_t tv_usec;
117+
};
118+
struct pcap_sf_pkthdr {
119+
struct pcap_timeval ts;
120+
uint32_t caplen;
121+
uint32_t len;
122+
};
123+
110124
void
111125
set_suspended(int s)
112126
{

0 commit comments

Comments
 (0)