diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2016-05-19 11:34:41 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2016-05-19 11:34:41 +0000 |
commit | d9dc7a0eec01d7e3cddeee5f3cb8eedff01d6658 (patch) | |
tree | 73233f97ae08fa24d0a14c83661fe58a801ab016 /sys | |
parent | ca987c04ba6fee4233ef4e0ad977f9612e22c47d (diff) |
Remove sysctl net.inet6.ip6.v6only
This sysctl is a no-op, read-only since it was introduced. There are no
plans to support IPv4-mapped addresses on OpenBSD, thus this sysctl is
meaningless.
Noticed by djm@, ok claudio@ mpi@ sthen@ henning@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet6/in6.h | 7 | ||||
-rw-r--r-- | sys/netinet6/in6_proto.c | 3 | ||||
-rw-r--r-- | sys/netinet6/ip6_input.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6_output.c | 12 | ||||
-rw-r--r-- | sys/netinet6/ip6_var.h | 3 |
5 files changed, 12 insertions, 17 deletions
diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 6e10b7bf9bc..82548d432f9 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.h,v 1.87 2015/12/03 10:34:24 tedu Exp $ */ +/* $OpenBSD: in6.h,v 1.88 2016/05/19 11:34:39 jca Exp $ */ /* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */ /* @@ -577,8 +577,7 @@ ifatoia6(struct ifaddr *ifa) #define IPV6CTL_DEFMCASTHLIM 18 #define IPV6CTL_USE_DEPRECATED 21 /* use deprecated addr (RFC2462 5.5.4) */ #define IPV6CTL_RR_PRUNE 22 /* walk timer for router renumbering */ -#define IPV6CTL_V6ONLY 24 -/* 25 to 40: resrved */ +/* 24 to 40: reserved */ #define IPV6CTL_MAXFRAGS 41 /* max fragments */ #define IPV6CTL_MFORWARDING 42 #define IPV6CTL_MULTIPATH 43 @@ -622,7 +621,7 @@ ifatoia6(struct ifaddr *ifa) { "use_deprecated", CTLTYPE_INT }, \ { "rr_prune", CTLTYPE_INT }, \ { 0, 0 }, \ - { "v6only", CTLTYPE_INT }, \ + { 0, 0 }, \ { 0, 0 }, \ { 0, 0 }, \ { 0, 0 }, \ diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 101e36864eb..38da42d6364 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_proto.c,v 1.84 2015/12/03 21:57:59 mpi Exp $ */ +/* $OpenBSD: in6_proto.c,v 1.85 2016/05/19 11:34:40 jca Exp $ */ /* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */ /* @@ -282,7 +282,6 @@ int ip6_use_deprecated = 1; /* allow deprecated addr (RFC2462 5.5.4) */ int ip6_rr_prune = 5; /* router renumbering prefix * walk list every 5 sec. */ int ip6_mcast_pmtu = 0; /* enable pMTU discovery for multicast? */ -const int ip6_v6only = 1; int ip6_neighborgcthresh = 2048; /* Threshold # of NDP entries for GC */ int ip6_maxifprefixes = 16; /* Max acceptable prefixes via RA per IF */ int ip6_maxifdefrouters = 16; /* Max acceptable def routers via RA */ diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index fa856e7ebac..83fd0fc2915 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_input.c,v 1.159 2016/05/07 09:58:06 mpi Exp $ */ +/* $OpenBSD: ip6_input.c,v 1.160 2016/05/19 11:34:40 jca Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -1369,8 +1369,6 @@ ip6_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, return (ENOTDIR); switch (name[0]) { - case IPV6CTL_V6ONLY: - return sysctl_rdint(oldp, oldlenp, newp, ip6_v6only); case IPV6CTL_DAD_PENDING: return sysctl_rdint(oldp, oldlenp, newp, ip6_dad_pending); case IPV6CTL_STATS: diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index da3e9bcf095..bac8542240a 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_output.c,v 1.206 2016/04/29 11:40:27 bluhm Exp $ */ +/* $OpenBSD: ip6_output.c,v 1.207 2016/05/19 11:34:40 jca Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -1237,11 +1237,11 @@ do { \ error = EINVAL; break; } - if ((ip6_v6only && optval) || - (!ip6_v6only && !optval)) - error = 0; - else + /* No support for IPv4-mapped addresses. */ + if (!optval) error = EINVAL; + else + error = 0; break; case IPV6_RECVTCLASS: OPTSET(IN6P_TCLASS); @@ -1493,7 +1493,7 @@ do { \ break; case IPV6_V6ONLY: - optval = (ip6_v6only != 0); /* XXX */ + optval = 1; break; case IPV6_PORTRANGE: diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index 35f13547600..5f6d961b38a 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_var.h,v 1.58 2016/04/27 21:14:29 markus Exp $ */ +/* $OpenBSD: ip6_var.h,v 1.59 2016/05/19 11:34:40 jca Exp $ */ /* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */ /* @@ -222,7 +222,6 @@ extern int ip6_use_deprecated; /* allow deprecated addr as source */ extern int ip6_rr_prune; /* router renumbering prefix * walk list every 5 sec. */ extern int ip6_mcast_pmtu; /* path MTU discovery for multicast */ -extern const int ip6_v6only; extern int ip6_neighborgcthresh; /* Threshold # of NDP entries for GC */ extern int ip6_maxifprefixes; /* Max acceptable prefixes via RA per IF */ extern int ip6_maxifdefrouters; /* Max acceptable def routers via RA */ |