nd6: Remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG and EXPERIMENTAL options

The draft-ietf-6man-ipv6only-flag has been obsoleted by RFC 8925.
Remove the EXPERIMENTAL compile option from the kernel and remove
DRAFT_IETF_6MAN_IPV6ONLY_FLAG from userland.
This compile option was not enabled by default.
Also regenerate src.conf.5.

Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D56228
This commit is contained in:
Pouria Mousavizadeh Tehrani committed 2026-04-10 23:42:09 +03:30
1 parent 2c6feab253
commit 87bea33a67
17 files changed
+2 -222

No files matched your search

-4
View File
@@ -52,10 +52,6 @@ SRCS+= ifpfsync.c # pfsync(4) support
SRCS+= ifbridge.c # bridge support
SRCS+= iflagg.c # lagg support
.if ${MK_EXPERIMENTAL} != "no"
CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG
CFLAGS+= -DEXPERIMENTAL
.endif
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
.endif
-4
View File
@@ -730,10 +730,6 @@ static struct cmd inet6_cmds[] = {
DEF_CMD("eui64", 0, setip6eui64),
DEF_CMD("stableaddr", ND6_IFF_STABLEADDR, setnd6flags),
DEF_CMD("-stableaddr", -ND6_IFF_STABLEADDR, setnd6flags),
#ifdef EXPERIMENTAL
DEF_CMD("ipv6_only", ND6_IFF_IPV6_ONLY_MANUAL,setnd6flags),
DEF_CMD("-ipv6_only", -ND6_IFF_IPV6_ONLY_MANUAL,setnd6flags),
#endif
};
static struct afswtch af_inet6 = {
-4
View File
@@ -62,10 +62,6 @@ static const char *ND6BITS[] = {
[6] = "NO_RADR",
[7] = "NO_PREFER_IFACE",
[8] = "NO_DAD",
#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG
[9] = "IPV6_ONLY",
[10] = "IPV6_ONLY_MANUAL",
#endif
[11] = "STABLEADDR",
[15] = "DEFAULTIF",
};
+1 -3
View File
@@ -1,5 +1,5 @@
.\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
.Dd April 3, 2026
.Dd April 10, 2026
.Dt SRC.CONF 5
.Os
.Sh NAME
@@ -721,8 +721,6 @@ An alternate bootstrap tool chain must be provided.
.It Va WITHOUT_EXAMPLES
Avoid installing examples to
.Pa /usr/share/examples/ .
.It Va WITH_EXPERIMENTAL
Include experimental features in the build.
.It Va WITHOUT_FDT
Do not build Flattened Device Tree support as part of the base system.
This includes the device tree compiler (dtc) and libfdt support library.
-1
View File
@@ -206,7 +206,6 @@ __DEFAULT_NO_OPTIONS = \
DISK_IMAGE_TOOLS_BOOTSTRAP \
DTRACE_ASAN \
DTRACE_TESTS \
EXPERIMENTAL \
HESIOD \
IPFILTER_IPFS \
LOADER_VERBOSE \
-1
View File
@@ -104,7 +104,6 @@ COMPAT_LINUXKPI opt_dontuse.h
COMPILING_LINT opt_global.h
CY_PCI_FASTINTR
DEADLKRES opt_watchdog.h
EXPERIMENTAL opt_global.h
DIRECTIO
FFCLOCK
FULL_PREEMPTION opt_sched.h
-39
View File
@@ -475,27 +475,6 @@ ether_output_frame(struct ifnet *ifp, struct mbuf *m)
return (0);
}
#ifdef EXPERIMENTAL
#if defined(INET6) && defined(INET)
/* draft-ietf-6man-ipv6only-flag */
/* Catch ETHERTYPE_IP, and ETHERTYPE_[REV]ARP if we are v6-only. */
if ((ifp->if_inet6->nd_flags & ND6_IFF_IPV6_ONLY_MASK) != 0) {
struct ether_header *eh;
eh = mtod(m, struct ether_header *);
switch (ntohs(eh->ether_type)) {
case ETHERTYPE_IP:
case ETHERTYPE_ARP:
case ETHERTYPE_REVARP:
m_freem(m);
return (EAFNOSUPPORT);
/* NOTREACHED */
break;
};
}
#endif
#endif
/*
* Queue message on interface, update output statistics if successful,
* and start output if interface not yet active.
@@ -541,24 +520,6 @@ ether_input_internal(struct ifnet *ifp, struct mbuf *m)
etype = ntohs(eh->ether_type);
random_harvest_queue_ether(m, sizeof(*m));
#ifdef EXPERIMENTAL
#if defined(INET6) && defined(INET)
/* draft-ietf-6man-ipv6only-flag */
/* Catch ETHERTYPE_IP, and ETHERTYPE_[REV]ARP if we are v6-only. */
if ((ifp->if_inet6->nd_flags & ND6_IFF_IPV6_ONLY_MASK) != 0) {
switch (etype) {
case ETHERTYPE_IP:
case ETHERTYPE_ARP:
case ETHERTYPE_REVARP:
m_freem(m);
return;
/* NOTREACHED */
break;
};
}
#endif
#endif
CURVNET_SET_QUIET(ifp->if_vnet);
if (ETHER_IS_MULTICAST(eh->ether_dhost)) {
-4
View File
@@ -243,10 +243,6 @@ struct nd_router_advert { /* router advertisement */
#define ND_RA_FLAG_RTPREF_LOW 0x18 /* 00011000 */
#define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */
#ifdef EXPERIMENTAL
#define ND_RA_FLAG_IPV6_ONLY 0x02 /* draft-ietf-6man-ipv6only-flag */
#endif
#define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1]
struct nd_neighbor_solicit { /* neighbor solicitation */
-6
View File
@@ -74,12 +74,6 @@ struct llentry;
#define ND6_IFF_NO_PREFER_IFACE 0x80 /* XXX: not related to ND. */
#define ND6_IFF_NO_DAD 0x100
#define ND6_IFF_STABLEADDR 0x800
#ifdef EXPERIMENTAL
/* XXX: not related to ND. */
#define ND6_IFF_IPV6_ONLY 0x200 /* draft-ietf-6man-ipv6only-flag */
#define ND6_IFF_IPV6_ONLY_MANUAL 0x400
#define ND6_IFF_IPV6_ONLY_MASK (ND6_IFF_IPV6_ONLY|ND6_IFF_IPV6_ONLY_MANUAL)
#endif
struct in6_nbrinfo {
char ifname[IFNAMSIZ]; /* if name, e.g. "en0" */
-112
View File
@@ -104,16 +104,6 @@ VNET_DEFINE(u_int32_t, ip6_temp_valid_lifetime) = DEF_TEMP_VALID_LIFETIME;
VNET_DEFINE(int, ip6_temp_regen_advance) = TEMPADDR_REGEN_ADVANCE;
#ifdef EXPERIMENTAL
VNET_DEFINE_STATIC(int, nd6_ignore_ipv6_only_ra) = 1;
#define V_nd6_ignore_ipv6_only_ra VNET(nd6_ignore_ipv6_only_ra)
SYSCTL_INT(_net_inet6_icmp6, OID_AUTO,
nd6_ignore_ipv6_only_ra, CTLFLAG_VNET | CTLFLAG_RW,
&VNET_NAME(nd6_ignore_ipv6_only_ra), 0,
"Ignore the 'IPv6-Only flag' in RA messages in compliance with "
"draft-ietf-6man-ipv6only-flag");
#endif
/* RTPREF_MEDIUM has to be 0! */
#define RTPREF_HIGH 1
#define RTPREF_MEDIUM 0
@@ -248,97 +238,6 @@ nd6_rs_input(struct mbuf *m, int off, int icmp6len)
m_freem(m);
}
#ifdef EXPERIMENTAL
/*
* An initial update routine for draft-ietf-6man-ipv6only-flag.
* We need to iterate over all default routers for the given
* interface to see whether they are all advertising the "S"
* (IPv6-Only) flag. If they do set, otherwise unset, the
* interface flag we later use to filter on.
*
* XXXGL: The use of IF_ADDR_WLOCK (previously it was IF_AFDATA_LOCK) in this
* function is quite strange.
*/
static void
defrtr_ipv6_only_ifp(struct ifnet *ifp)
{
struct nd_defrouter *dr;
bool ipv6_only, ipv6_only_old;
#ifdef INET
struct epoch_tracker et;
struct ifaddr *ifa;
bool has_ipv4_addr;
#endif
if (V_nd6_ignore_ipv6_only_ra != 0)
return;
ipv6_only = true;
ND6_RLOCK();
TAILQ_FOREACH(dr, &V_nd6_defrouter, dr_entry)
if (dr->ifp == ifp &&
(dr->raflags & ND_RA_FLAG_IPV6_ONLY) == 0)
ipv6_only = false;
ND6_RUNLOCK();
IF_ADDR_WLOCK(ifp);
ipv6_only_old = ifp->if_inet6->nd_flags & ND6_IFF_IPV6_ONLY;
IF_ADDR_WUNLOCK(ifp);
/* If nothing changed, we have an early exit. */
if (ipv6_only == ipv6_only_old)
return;
#ifdef INET
/*
* Should we want to set the IPV6-ONLY flag, check if the
* interface has a non-0/0 and non-link-local IPv4 address
* configured on it. If it has we will assume working
* IPv4 operations and will clear the interface flag.
*/
has_ipv4_addr = false;
if (ipv6_only) {
NET_EPOCH_ENTER(et);
CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET)
continue;
if (in_canforward(
satosin(ifa->ifa_addr)->sin_addr)) {
has_ipv4_addr = true;
break;
}
}
NET_EPOCH_EXIT(et);
}
if (ipv6_only && has_ipv4_addr) {
log(LOG_NOTICE, "%s rcvd RA w/ IPv6-Only flag set but has IPv4 "
"configured, ignoring IPv6-Only flag.\n", ifp->if_xname);
ipv6_only = false;
}
#endif
IF_ADDR_WLOCK(ifp);
if (ipv6_only)
ifp->if_inet6->nd_flags |= ND6_IFF_IPV6_ONLY;
else
ifp->if_inet6->nd_flags &= ~ND6_IFF_IPV6_ONLY;
IF_ADDR_WUNLOCK(ifp);
#ifdef notyet
/* Send notification of flag change. */
#endif
}
static void
defrtr_ipv6_only_ipf_down(struct ifnet *ifp)
{
IF_ADDR_WLOCK(ifp);
ifp->if_inet6->nd_flags &= ~ND6_IFF_IPV6_ONLY;
IF_ADDR_WUNLOCK(ifp);
}
#endif /* EXPERIMENTAL */
void
nd6_ifnet_link_event(void *arg __unused, struct ifnet *ifp, int linkstate)
{
@@ -349,10 +248,6 @@ nd6_ifnet_link_event(void *arg __unused, struct ifnet *ifp, int linkstate)
* unreachable but a different interface might still have connectivity.
*/
#ifdef EXPERIMENTAL
if (linkstate == LINK_STATE_DOWN)
defrtr_ipv6_only_ipf_down(ifp);
#endif
}
static void
@@ -599,9 +494,6 @@ nd6_ra_input(struct mbuf *m, int off, int icmp6len)
}
}
dr = defrtrlist_update(&dr0);
#ifdef EXPERIMENTAL
defrtr_ipv6_only_ifp(ifp);
#endif
/* Prefix Information */
if (ndopts.nd_opts_pi != NULL) {
/*
@@ -779,10 +671,6 @@ defrouter_del(struct nd_defrouter *dr)
if (dr->ifp->if_inet6->nd_flags & ND6_IFF_ACCEPT_RTADV)
rt6_flush(&dr->rtaddr, dr->ifp);
#ifdef EXPERIMENTAL
defrtr_ipv6_only_ifp(dr->ifp);
#endif
if (dr->installed) {
deldr = dr;
defrouter_delreq(dr);
-1
View File
@@ -1 +0,0 @@
Include experimental features in the build.
-5
View File
@@ -23,11 +23,6 @@ LIBADD= xo
CFLAGS+= -I. -I${.CURDIR}
CFLAGS+= -D_U_=""
.if ${MK_EXPERIMENTAL} != "no"
CFLAGS+= -DEXPERIMENTAL
CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG
.endif
.if ${MK_NETLINK_SUPPORT} != "no"
SRCS+= ndp_netlink.c
.else
+1 -6
View File
@@ -1225,12 +1225,7 @@ rtrlist(void)
*pflags++ = 'O';
xo_emit("{el:%s}", "other");
}
#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG
if (p->flags & ND_RA_FLAG_IPV6_ONLY) {
*pflags++ = 'S';
xo_emit("{el:%s}", "ipv6only");
}
#endif
xo_close_list("flags_pretty");
xo_emit(", flags={:flags/%s}", rflags);
-5
View File
@@ -20,11 +20,6 @@ MAN= rtadvd.conf.5 rtadvd.8
SRCS= rtadvd.c rrenum.c advcap.c if.c config.c timer.c timer_subr.c \
control.c control_server.c
.if ${MK_EXPERIMENTAL} != "no"
CFLAGS+= -DEXPERIMENTAL
CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG
.endif
LIBADD= util
WARNS?= 1
-11
View File
@@ -442,10 +442,6 @@ getconfig(struct ifinfo *ifi)
}
val |= ND_RA_FLAG_RTPREF_LOW;
}
#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG
if (strchr(flagstr, 'S'))
val |= ND_RA_FLAG_IPV6_ONLY;
#endif
} else
MAYHAVE(val, "raflags", 0);
@@ -461,9 +457,6 @@ getconfig(struct ifinfo *ifi)
__func__, rai->rai_rtpref, ifi->ifi_ifname);
goto getconfig_free_rai;
}
#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG
rai->rai_ipv6onlyflg = val & ND_RA_FLAG_IPV6_ONLY;
#endif
MAYHAVE(val, "rltime", rai->rai_maxinterval * 3);
if ((uint16_t)val && ((uint16_t)val < rai->rai_maxinterval ||
@@ -1485,10 +1478,6 @@ make_packet(struct rainfo *rai)
rai->rai_managedflg ? ND_RA_FLAG_MANAGED : 0;
ra->nd_ra_flags_reserved |=
rai->rai_otherflg ? ND_RA_FLAG_OTHER : 0;
#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG
ra->nd_ra_flags_reserved |=
rai->rai_ipv6onlyflg ? ND_RA_FLAG_IPV6_ONLY : 0;
#endif
ra->nd_ra_router_lifetime = htons(rai->rai_lifetime);
ra->nd_ra_reachable = htonl(rai->rai_reachabletime);
ra->nd_ra_retransmit = htonl(rai->rai_retranstimer);
-13
View File
@@ -1148,19 +1148,6 @@ ra_input(int len, struct nd_router_advert *nra,
sizeof(ntopbuf)), on_off[rai->rai_otherflg]);
inconsistent++;
}
#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG
/* S "IPv6-Only" (Six, Silence-IPv4) flag */
if ((nra->nd_ra_flags_reserved & ND_RA_FLAG_IPV6_ONLY) !=
rai->rai_ipv6onlyflg) {
syslog(LOG_NOTICE,
"S flag inconsistent on %s:"
" %s from %s, %s from us",
ifi->ifi_ifname, on_off[!rai->rai_ipv6onlyflg],
inet_ntop(AF_INET6, &from->sin6_addr, ntopbuf,
sizeof(ntopbuf)), on_off[rai->rai_ipv6onlyflg]);
inconsistent++;
}
#endif
/* Reachable Time */
reachabletime = ntohl(nra->nd_ra_reachable);
if (reachabletime && rai->rai_reachabletime &&
-3
View File
@@ -204,9 +204,6 @@ struct rainfo {
uint16_t rai_mininterval; /* MinRtrAdvInterval */
int rai_managedflg; /* AdvManagedFlag */
int rai_otherflg; /* AdvOtherConfigFlag */
#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG
int rai_ipv6onlyflg; /* AdvIPv6OnlyFlag */
#endif
int rai_rtpref; /* router preference */
uint32_t rai_linkmtu; /* AdvLinkMTU */