Line 0
Link Here
|
|
|
1 |
--- pfutils.c.orig 2024-02-29 18:24:10.373450000 +0000 |
2 |
+++ pfutils.c 2024-02-29 18:35:27.247364000 +0000 |
3 |
@@ -190,9 +190,15 @@ pf_kill_state(int fd, struct in_addr ip) |
4 |
sizeof(psk.psk_src.addr.v.a.addr)); |
5 |
memset(&psk.psk_src.addr.v.a.mask, 0xff, |
6 |
sizeof(psk.psk_src.addr.v.a.mask)); |
7 |
+#if (defined(__FreeBSD_version) && (__FreeBSD_version < 1500000)) |
8 |
if (ioctl(fd, DIOCKILLSTATES, &psk) == -1) { |
9 |
log_warn("DIOCKILLSTATES failed"); |
10 |
} |
11 |
+#else |
12 |
+ if (ioctl(fd, DIOCKILLSTATESNV, &psk) == -1) { |
13 |
+ log_warn("DIOCKILLSTATESNV failed"); |
14 |
+ } |
15 |
+#endif |
16 |
|
17 |
/* Kill all states to target */ |
18 |
memset(&psk.psk_src, 0, sizeof(psk.psk_src)); |
19 |
@@ -200,9 +206,15 @@ pf_kill_state(int fd, struct in_addr ip) |
20 |
sizeof(psk.psk_dst.addr.v.a.addr)); |
21 |
memset(&psk.psk_dst.addr.v.a.mask, 0xff, |
22 |
sizeof(psk.psk_dst.addr.v.a.mask)); |
23 |
+#if (defined(__FreeBSD_version) && (__FreeBSD_version < 1500000)) |
24 |
if (ioctl(fd, DIOCKILLSTATES, &psk) == -1) { |
25 |
log_warn("DIOCKILLSTATES failed"); |
26 |
} |
27 |
+#else |
28 |
+ if (ioctl(fd, DIOCKILLSTATESNV, &psk) == -1) { |
29 |
+ log_warn("DIOCKILLSTATESNV failed"); |
30 |
+ } |
31 |
+#endif |
32 |
} |
33 |
|
34 |
/* inspired by ("stolen") from usr.bin/ssh/atomicio.c */ |