git: 6cf595b31f7a - main - net/dhcpd: Add ipv6-only-preferred option per RFC 8925
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 24 Nov 2023 19:38:50 UTC
The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/ports/commit/?id=6cf595b31f7a2447d1a8c82fb9a88838ffca40a7 commit 6cf595b31f7a2447d1a8c82fb9a88838ffca40a7 Author: Mallory <mallorya@fastmail.com> AuthorDate: 2023-11-24 08:25:21 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2023-11-24 19:38:21 +0000 net/dhcpd: Add ipv6-only-preferred option per RFC 8925 While here, pet linters. PR: 275217 Reported by: mallorya@fastmail.com Approved by: koue@chaosophia.net (maintainer) --- net/dhcpd/Makefile | 13 +++++-------- net/dhcpd/files/patch-dhcp-options.5 | 13 +++++++++++++ net/dhcpd/files/patch-tables.c | 11 +++++++++++ 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/net/dhcpd/Makefile b/net/dhcpd/Makefile index 52798760d878..afb1b64f6db3 100644 --- a/net/dhcpd/Makefile +++ b/net/dhcpd/Makefile @@ -10,25 +10,22 @@ LICENSE= BSD3CLAUSE USES= ssl uidfix -WRKSRC_SUBDIR= src/usr.sbin/${PORTNAME} - USE_GITHUB= yes GH_ACCOUNT= koue - -CONFLICTS= isc-dhcp4[1-3]-server* - USE_RC_SUBR= dhcpd +MAKE_ARGS+= BINDIR=${PREFIX}/sbin MANDIR=${PREFIX}/man/man + CFLAGS+= -Wall -MAKE_ARGS+= BINDIR=${PREFIX}/sbin MANDIR=${PREFIX}/man/man +CONFLICTS= isc-dhcp4[1-3]-server* +WRKSRC_SUBDIR= src/usr.sbin/${PORTNAME} OPTIONS_DEFINE= NOPF +OPTIONS_SUB= yes NOPF_DESC= Disable PF support -OPTIONS_SUB= yes - NOPF_CFLAGS= -DNO_PF=1 post-patch: diff --git a/net/dhcpd/files/patch-dhcp-options.5 b/net/dhcpd/files/patch-dhcp-options.5 new file mode 100644 index 000000000000..03ca38af4016 --- /dev/null +++ b/net/dhcpd/files/patch-dhcp-options.5 @@ -0,0 +1,13 @@ +--- dhcp-options.5.orig 2020-04-13 17:07:01 UTC ++++ dhcp-options.5 +@@ -346,6 +346,10 @@ This option specifies whether the client should config + for packet forwarding. + A value of 0 means disable IP forwarding, and a value of 1 means enable + IP forwarding. ++.It Ic option ipv6-only-preferred Ar uint32 ; ++The number of seconds for which an IPv6-only-capable client should disable ++DHCPv4. ++See RFC 8925 for details. + .It Ic option irc-server Ar ip-address Oo , Ar ip-address ... Oc ; + The + .Ic irc-server diff --git a/net/dhcpd/files/patch-tables.c b/net/dhcpd/files/patch-tables.c new file mode 100644 index 000000000000..3195ef2f11db --- /dev/null +++ b/net/dhcpd/files/patch-tables.c @@ -0,0 +1,11 @@ +--- tables.c.orig 2023-11-20 14:12:38 UTC ++++ tables.c +@@ -184,7 +184,7 @@ struct option dhcp_options[256] = { + { "option-105", "X", &dhcp_universe, 105 }, + { "option-106", "X", &dhcp_universe, 106 }, + { "option-107", "X", &dhcp_universe, 107 }, +- { "option-108", "X", &dhcp_universe, 108 }, ++ { "ipv6-only-preferred", "L", &dhcp_universe, 108 }, + { "option-109", "X", &dhcp_universe, 109 }, + { "option-110", "X", &dhcp_universe, 110 }, + { "option-111", "X", &dhcp_universe, 111 },