diff --git a/net/dhcpd/Makefile b/net/dhcpd/Makefile index 98a562f5ddbd..d11faa7e7793 100644 --- a/net/dhcpd/Makefile +++ b/net/dhcpd/Makefile @@ -1,40 +1,40 @@ PORTNAME= dhcpd PORTVERSION= 6.6.20200413 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MAINTAINER= koue@chaosophia.net COMMENT= OpenBSD dhcp daemon WWW= https://github.com/koue/dhcpd LICENSE= BSD3CLAUSE USES= ssl uidfix USE_GITHUB= yes GH_ACCOUNT= koue USE_RC_SUBR= dhcpd MAKE_ARGS+= BINDIR=${PREFIX}/sbin MANDIR=${PREFIX}/share/man/man CFLAGS+= -Wall CONFLICTS= isc-dhcp4[1-3]-server* WRKSRC_SUBDIR= src/usr.sbin/${PORTNAME} OPTIONS_DEFINE= NOPF OPTIONS_SUB= yes NOPF_DESC= Disable PF support NOPF_CFLAGS= -DNO_PF=1 post-patch: @${REINPLACE_CMD} -e "s|/etc/dhcpd.conf|${PREFIX}/etc/dhcpd.conf|" \ ${WRKSRC}/dhcpd.[h8] post-install: ${INSTALL_DATA} ${WRKSRC}/dhcpd.conf \ ${STAGEDIR}${PREFIX}/etc/dhcpd.conf.sample .include diff --git a/net/dhcpd/files/patch-pfutils.c b/net/dhcpd/files/patch-pfutils.c new file mode 100644 index 000000000000..4c652c9ea1b8 --- /dev/null +++ b/net/dhcpd/files/patch-pfutils.c @@ -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 */