Bug 275217 - net/dhcpd: Add ipv6-only-preferred option per RFC 8925
Summary: net/dhcpd: Add ipv6-only-preferred option per RFC 8925
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-20 16:12 UTC by Mallory
Modified: 2024-02-12 10:33 UTC (History)
3 users (show)

See Also:
koue: maintainer-feedback+


Attachments
Patch which implements RFC 8925 (1.41 KB, patch)
2023-11-20 16:12 UTC, Mallory
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mallory 2023-11-20 16:12:17 UTC
Created attachment 246449 [details]
Patch which implements RFC 8925

RFC 8925 "specifies a DHCPv4 option to indicate that a host supports an IPv6-only mode and is willing to forgo obtaining an IPv4 address if the network provides IPv6 connectivity."

If you have a client that supports RFC 8925, you can see it working by adding `option ipv6-only-preferred 300;` to your dhcpd.conf and verifying that your client does not have an IPv4 address.
Comment 1 Fernando Apesteguía freebsd_committer freebsd_triage 2023-11-22 08:55:18 UTC
^Triage: [tags] in issue Titles are deprecated.
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2023-11-24 13:04:05 UTC
This doesn't build in current:

gzip -cn dhcp-options.5 > dhcp-options.5.gz
--- pfutils.o ---
pfutils.c:51:16: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
pftable_handler()
               ^
                void
pfutils.c:193:16: error: use of undeclared identifier 'DIOCKILLSTATES'
        if (ioctl(fd, DIOCKILLSTATES, &psk) == -1) {
                      ^
pfutils.c:203:16: error: use of undeclared identifier 'DIOCKILLSTATES'
        if (ioctl(fd, DIOCKILLSTATES, &psk) == -1) {
                      ^
1 warning and 2 errors generated.
*** [pfutils.o] Error code 1

make[1]: stopped in /wrkdirs/usr/ports/net/dhcpd/work/dhcpd-6.6.20200413/src/usr.sbin/dhcpd
--- sync.o ---

Can you have a look?
Comment 3 Mallory 2023-11-24 18:04:56 UTC
Thanks for building on CURRENT and catching that issue, Fernando. This port doesn't build with or without this patch, so I've created a separate bug to track that issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275313
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-11-24 19:39:25 UTC
A commit in branch main references this bug:

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 (new) | 13 +++++++++++++
 net/dhcpd/files/patch-tables.c (new)       | 11 +++++++++++
 3 files changed, 29 insertions(+), 8 deletions(-)
Comment 5 Fernando Apesteguía freebsd_committer freebsd_triage 2023-11-24 19:39:35 UTC
Committed then,

Thanks!
Comment 6 Mallory 2023-11-24 20:57:41 UTC
Thank you!
Comment 7 Dries Michiels freebsd_committer freebsd_triage 2024-02-12 10:31:41 UTC
Hmmm, I'm now wondering how this slipped my "maintainer approval requirement". Kou is no active maintainer anymore.
Comment 8 Dries Michiels freebsd_committer freebsd_triage 2024-02-12 10:33:16 UTC
Oh, please forget my comment. This is regarding dhcpD, not dhcpcd :D