Page MenuHomeFreeBSD

nd6: Remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG and EXPERIMENTAL options
Needs ReviewPublic

Authored by pouria on Thu, Apr 2, 8:43 PM.

Details

Reviewers
bz
glebius
zlei
Group Reviewers
network
Summary

Following the proposal in the mailing list [1].

[1] https://lists.freebsd.org/archives/freebsd-current/2026-April/010065.html

Test Plan

Run network tests, but since this code
was originally disabled, there is no functional change here.
other than moving ipv6_only flag of ifconfig outside the experimental code:

# ping -c1 9.9.9.9
PING 9.9.9.9 (9.9.9.9): 56 data bytes
64 bytes from 9.9.9.9: icmp_seq=0 ttl=56 time=135.319 ms
--- 9.9.9.9 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 135.319/135.319/135.319/0.000 ms
# ifconfig vtnet0 inet6 ipv6_only
# ping -c1 9.9.9.9
PING 9.9.9.9 (9.9.9.9): 56 data bytes
ping: sendto: Address family not supported by protocol family
--- 9.9.9.9 ping statistics ---
1 packets transmitted, 0 packets received, 100.0% packet loss
# ifconfig vtnet0 inet6 -ipv6_only
# ping 9.9.9.9
PING 9.9.9.9 (9.9.9.9): 56 data bytes
64 bytes from 9.9.9.9: icmp_seq=0 ttl=56 time=118.902 ms

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 71933
Build 68816: arc lint + arc unit

Event Timeline

pouria requested review of this revision.Thu, Apr 2, 8:43 PM

@bz done.

sbin/ifconfig/af_inet6.c
734–735

I intentionally kept those here.
I can remove them and readd then in another review, if required.
I'll update the manual.

sbin/ifconfig/af_nd6.c
67

same here.

sys/net/if_ethersubr.c
481–496

same here.

547–558

same

sys/netinet6/nd6.h
76–79

same.

sys/netinet6/nd6_rtr.c
249

I'll reuse this function in future. therefore, removing and re-adding it would be redundant.

sbin/ifconfig/af_inet6.c
734–735

Sorry, why would you want to do that? I mean why do you intend to keep this?

sbin/ifconfig/af_inet6.c
734–735

If DHCPv6-only support is implemented in the future, we'll eventually need to set a flag via the SIOCSIFINFO_IN6 ioctl.
That will also let ifconfig display the flag status.
I'm not insisting we keep the current bits now, but if we remove them we'll have to re-add equivalent support later for RFC 8925.

Remove the whole EXPERIMENTAL kernel option as noted by @bz.

pouria retitled this revision from nd6: Remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG experimental code to nd6: Remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG and EXPERIMENTAL options.Thu, Apr 2, 10:57 PM
sbin/ifconfig/af_inet6.c
734–735

Ok, I'll have to re-read the RFC but I believe that simply stops you from getting an IPv4 address to a specific interface but not to actually disable all IPv4 traffic.

You MAY do so BUT

See section 3.2:

The host MAY disable the IPv4 stack completely on the affected interface for V6ONLY_WAIT seconds or until the network attachment event, whichever happens first.

and later

When an IPv6-only-capable client receives the IPv6-Only Preferred option from the server, the client MAY configure an IPv4 link-local address [RFC3927]. In that case, IPv6-only-capable devices might still be able to communicate over IPv4 to other devices on the link.

Ignoring the IPv4 link-local case, which likely is rare on FreeBSD, you'd at least would need to turn the option off automagically again on interface flip (oper/admin state going down/up). But you are going to start fighting windmills as you also have to do the right thing after V6ONLY_WAIT seconds, or upon DHCPv4 client process ending. The much RFC 8925 is using the term "IPv6-only" it nowhere talks about a real IPv6-only network or machine. Keep that in mind. Keep it simple.

sbin/ifconfig/af_inet6.c
734–735

Make sense, I'll remove it all and rework it.
Thank you!

@bz
I'd appreciate if your review this again when you have time.
I won't proceed without your approval.