Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152779884
D56228.id174818.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
10 KB
Referenced Files
None
Subscribers
None
D56228.id174818.diff
View Options
diff --git a/sbin/ifconfig/Makefile b/sbin/ifconfig/Makefile
--- a/sbin/ifconfig/Makefile
+++ b/sbin/ifconfig/Makefile
@@ -52,10 +52,6 @@
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
diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c
--- a/sbin/ifconfig/af_inet6.c
+++ b/sbin/ifconfig/af_inet6.c
@@ -730,10 +730,8 @@
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 = {
diff --git a/sbin/ifconfig/af_nd6.c b/sbin/ifconfig/af_nd6.c
--- a/sbin/ifconfig/af_nd6.c
+++ b/sbin/ifconfig/af_nd6.c
@@ -62,10 +62,7 @@
[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",
};
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -475,9 +475,7 @@
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;
@@ -493,7 +491,6 @@
break;
};
}
-#endif
#endif
/*
@@ -541,9 +538,7 @@
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) {
@@ -556,7 +551,6 @@
break;
};
}
-#endif
#endif
CURVNET_SET_QUIET(ifp->if_vnet);
diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h
--- a/sys/netinet/icmp6.h
+++ b/sys/netinet/icmp6.h
@@ -243,10 +243,6 @@
#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 */
diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h
--- a/sys/netinet6/nd6.h
+++ b/sys/netinet6/nd6.h
@@ -73,13 +73,10 @@
#define ND6_IFF_NO_RADR 0x40
#define ND6_IFF_NO_PREFER_IFACE 0x80 /* XXX: not related to ND. */
#define ND6_IFF_NO_DAD 0x100
+#define ND6_IFF_IPV6_ONLY_MANUAL 0x400 /* XXX: not related to ND. */
#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
+
+#define ND6_IFF_IPV6_ONLY_MASK (ND6_IFF_IPV6_ONLY_MANUAL)
struct in6_nbrinfo {
char ifname[IFNAMSIZ]; /* if name, e.g. "en0" */
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -104,16 +104,6 @@
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 @@
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)
{
@@ -347,12 +246,9 @@
* XXX-BZ we might want to trigger re-evaluation of our default router
* availability. E.g., on link down the default router might be
* unreachable but a different interface might still have connectivity.
+ * XXXPO: We may also want to re-evaluate onlink prefixes too.
*/
-#ifdef EXPERIMENTAL
- if (linkstate == LINK_STATE_DOWN)
- defrtr_ipv6_only_ipf_down(ifp);
-#endif
}
static void
@@ -599,9 +495,6 @@
}
}
dr = defrtrlist_update(&dr0);
-#ifdef EXPERIMENTAL
- defrtr_ipv6_only_ifp(ifp);
-#endif
/* Prefix Information */
if (ndopts.nd_opts_pi != NULL) {
/*
@@ -779,10 +672,6 @@
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);
diff --git a/usr.sbin/ndp/Makefile b/usr.sbin/ndp/Makefile
--- a/usr.sbin/ndp/Makefile
+++ b/usr.sbin/ndp/Makefile
@@ -23,11 +23,6 @@
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
diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c
--- a/usr.sbin/ndp/ndp.c
+++ b/usr.sbin/ndp/ndp.c
@@ -1225,12 +1225,7 @@
*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);
diff --git a/usr.sbin/rtadvd/Makefile b/usr.sbin/rtadvd/Makefile
--- a/usr.sbin/rtadvd/Makefile
+++ b/usr.sbin/rtadvd/Makefile
@@ -20,11 +20,6 @@
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
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
--- a/usr.sbin/rtadvd/config.c
+++ b/usr.sbin/rtadvd/config.c
@@ -442,10 +442,6 @@
}
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 @@
__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 @@
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);
diff --git a/usr.sbin/rtadvd/rtadvd.h b/usr.sbin/rtadvd/rtadvd.h
--- a/usr.sbin/rtadvd/rtadvd.h
+++ b/usr.sbin/rtadvd/rtadvd.h
@@ -204,9 +204,6 @@
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 */
diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c
--- a/usr.sbin/rtadvd/rtadvd.c
+++ b/usr.sbin/rtadvd/rtadvd.c
@@ -1148,19 +1148,6 @@
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 &&
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 18, 1:37 AM (16 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31690758
Default Alt Text
D56228.id174818.diff (10 KB)
Attached To
Mode
D56228: nd6: Remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG and EXPERIMENTAL options
Attached
Detach File
Event Timeline
Log In to Comment