Module Name: src
Committed By: rin
Date: Tue Sep 3 09:03:18 UTC 2024
Modified Files:
src/dist/pf/sbin/pflogd: pflogd.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/dist/pf/sbin/pflogd/pflogd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/dist/pf/sbin/pflogd/pflogd.c
diff -u src/dist/pf/sbin/pflogd/pflogd.c:1.12 src/dist/pf/sbin/pflogd/pflogd.c:1.13
--- src/dist/pf/sbin/pflogd/pflogd.c:1.12 Sat Aug 19 14:56:22 2023
+++ src/dist/pf/sbin/pflogd/pflogd.c Tue Sep 3 09:03:18 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: pflogd.c,v 1.12 2023/08/19 14:56:22 christos Exp $ */
+/* $NetBSD: pflogd.c,v 1.13 2024/09/03 09:03:18 rin Exp $ */
/* $OpenBSD: pflogd.c,v 1.45 2007/06/06 14:11:26 henning Exp $ */
/*
@@ -107,6 +107,20 @@ static size_t bufleft = 0; /* bytes left
static int suspended = -1;
static long packets_dropped = 0;
+/*
+ * XXX Taken from libpcap. These are no longer exposed for >= 1.10.5,
+ * for which tv_{,u}sec were converted to unsigned.
+ */
+struct pcap_timeval {
+ uint32_t tv_sec;
+ uint32_t tv_usec;
+};
+struct pcap_sf_pkthdr {
+ struct pcap_timeval ts;
+ uint32_t caplen;
+ uint32_t len;
+};
+
void
set_suspended(int s)
{