mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
net/dhcpd: fix build on 15-CURRENT
PR: 275313 Reported by: Mallorya@fastmail.com Submitted by: maintainer
This commit is contained in:
parent
762aa0135a
commit
ad291cdd00
@ -1,6 +1,6 @@
|
||||
PORTNAME= dhcpd
|
||||
PORTVERSION= 6.6.20200413
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net
|
||||
|
||||
MAINTAINER= koue@chaosophia.net
|
||||
|
34
net/dhcpd/files/patch-pfutils.c
Normal file
34
net/dhcpd/files/patch-pfutils.c
Normal file
@ -0,0 +1,34 @@
|
||||
--- pfutils.c.orig 2024-02-29 18:24:10.373450000 +0000
|
||||
+++ pfutils.c 2024-02-29 18:35:27.247364000 +0000
|
||||
@@ -190,9 +190,15 @@ pf_kill_state(int fd, struct in_addr ip)
|
||||
sizeof(psk.psk_src.addr.v.a.addr));
|
||||
memset(&psk.psk_src.addr.v.a.mask, 0xff,
|
||||
sizeof(psk.psk_src.addr.v.a.mask));
|
||||
+#if (defined(__FreeBSD_version) && (__FreeBSD_version < 1500000))
|
||||
if (ioctl(fd, DIOCKILLSTATES, &psk) == -1) {
|
||||
log_warn("DIOCKILLSTATES failed");
|
||||
}
|
||||
+#else
|
||||
+ if (ioctl(fd, DIOCKILLSTATESNV, &psk) == -1) {
|
||||
+ log_warn("DIOCKILLSTATESNV failed");
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
/* Kill all states to target */
|
||||
memset(&psk.psk_src, 0, sizeof(psk.psk_src));
|
||||
@@ -200,9 +206,15 @@ pf_kill_state(int fd, struct in_addr ip)
|
||||
sizeof(psk.psk_dst.addr.v.a.addr));
|
||||
memset(&psk.psk_dst.addr.v.a.mask, 0xff,
|
||||
sizeof(psk.psk_dst.addr.v.a.mask));
|
||||
+#if (defined(__FreeBSD_version) && (__FreeBSD_version < 1500000))
|
||||
if (ioctl(fd, DIOCKILLSTATES, &psk) == -1) {
|
||||
log_warn("DIOCKILLSTATES failed");
|
||||
}
|
||||
+#else
|
||||
+ if (ioctl(fd, DIOCKILLSTATESNV, &psk) == -1) {
|
||||
+ log_warn("DIOCKILLSTATESNV failed");
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* inspired by ("stolen") from usr.bin/ssh/atomicio.c */
|
Loading…
Reference in New Issue
Block a user