diff options
author | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2020-08-15 11:37:44 +0000 |
---|---|---|
committer | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2020-08-15 11:37:44 +0000 |
commit | bec053ffe01ddc571fb09d1758708c407c33ddfd (patch) | |
tree | 9bb3fdbe17646a590367f490a25907a74073b6e9 | |
parent | 04996cb74b187184e2d7b9015bb193e834985044 (diff) |
Make net.inet6.ip6.deembed_scopeid behaviour default & remove sysctl.
Submitted by: Neel Chauhan <neel AT neelc DOT org>
Differential Revision: https://reviews.freebsd.org/D25637
Notes
Notes:
svn path=/head/; revision=364250
-rw-r--r-- | sys/net/rtsock.c | 10 | ||||
-rw-r--r-- | sys/netinet6/in6.c | 3 | ||||
-rw-r--r-- | sys/netinet6/scope6.c | 4 | ||||
-rw-r--r-- | sys/netinet6/scope6_var.h | 3 |
4 files changed, 6 insertions, 14 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 8e00c95942ac..0b8edf452c23 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -900,7 +900,7 @@ route_output(struct mbuf *m, struct socket *so, ...) error = lla_rt_output(rtm, &info); #ifdef INET6 if (error == 0) - rti_need_deembed = (V_deembed_scopeid) ? 1 : 0; + rti_need_deembed = 1; #endif goto flush; } @@ -915,7 +915,7 @@ route_output(struct mbuf *m, struct socket *so, ...) error = rib_action(fibnum, rtm->rtm_type, &info, &rc); if (error == 0) { #ifdef INET6 - rti_need_deembed = (V_deembed_scopeid) ? 1 : 0; + rti_need_deembed = 1; #endif rtm->rtm_index = rc.rc_nh_new->nh_ifp->if_index; nh = rc.rc_nh_new; @@ -930,7 +930,7 @@ route_output(struct mbuf *m, struct socket *so, ...) } #ifdef INET6 /* rt_msg2() will not be used when RTM_DELETE fails. */ - rti_need_deembed = (V_deembed_scopeid) ? 1 : 0; + rti_need_deembed = 1; #endif break; @@ -1192,7 +1192,7 @@ rtsock_msg_mbuf(int type, struct rt_addrinfo *rtinfo) rtinfo->rti_addrs |= (1 << i); dlen = SA_SIZE(sa); #ifdef INET6 - if (V_deembed_scopeid && sa->sa_family == AF_INET6) { + if (sa->sa_family == AF_INET6) { sin6 = (struct sockaddr_in6 *)&ss; bcopy(sa, sin6, sizeof(*sin6)); if (sa6_recoverscope(sin6) == 0) @@ -1298,7 +1298,7 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int * dlen = SA_SIZE(sa); if (cp != NULL && buflen >= dlen) { #ifdef INET6 - if (V_deembed_scopeid && sa->sa_family == AF_INET6) { + if (sa->sa_family == AF_INET6) { sin6 = (struct sockaddr_in6 *)&ss; bcopy(sa, sin6, sizeof(*sin6)); if (sa6_recoverscope(sin6) == 0) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index fb53adb86e82..31cb54aef6a0 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2374,8 +2374,7 @@ in6_lltable_dump_entry(struct lltable *llt, struct llentry *lle, ndpc.rtm.rtm_type = RTM_GET; ndpc.rtm.rtm_flags = RTF_UP; ndpc.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY; - if (V_deembed_scopeid) - sa6_recoverscope(&ndpc.sin6); + sa6_recoverscope(&ndpc.sin6); /* publish */ if (lle->la_flags & LLE_PUB) diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c index 42d999be6a8d..f99585dc1789 100644 --- a/sys/netinet6/scope6.c +++ b/sys/netinet6/scope6.c @@ -60,11 +60,7 @@ VNET_DEFINE(int, ip6_use_defzone) = 1; #else VNET_DEFINE(int, ip6_use_defzone) = 0; #endif -VNET_DEFINE(int, deembed_scopeid) = 1; SYSCTL_DECL(_net_inet6_ip6); -SYSCTL_INT(_net_inet6_ip6, OID_AUTO, deembed_scopeid, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(deembed_scopeid), 0, - "Extract embedded zone ID and set it to sin6_scope_id in sockaddr_in6."); /* * The scope6_lock protects the global sid default stored in diff --git a/sys/netinet6/scope6_var.h b/sys/netinet6/scope6_var.h index cdb2b9572bc2..181e30afe6f8 100644 --- a/sys/netinet6/scope6_var.h +++ b/sys/netinet6/scope6_var.h @@ -47,9 +47,6 @@ struct scope6_id { uint32_t s6id_list[IPV6_ADDR_SCOPES_COUNT]; }; -VNET_DECLARE(int, deembed_scopeid); -#define V_deembed_scopeid VNET(deembed_scopeid) - void scope6_init(void); struct scope6_id *scope6_ifattach(struct ifnet *); void scope6_ifdetach(struct scope6_id *); |