diff options
| author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2002-07-25 17:40:45 +0000 |
|---|---|---|
| committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2002-07-25 17:40:45 +0000 |
| commit | eccb7001eea93b6f78ce07e190eb8f162a7f352d (patch) | |
| tree | 7145dd896cf6ecc88290710ad88db0a06897a3bc /sys/netinet/tcp_usrreq.c | |
| parent | 72429e49f5218ce22a5cac7c2fe2fa7383cc0d02 (diff) | |
Notes
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
| -rw-r--r-- | sys/netinet/tcp_usrreq.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 9c4b547767cf..286fd7f2781c 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -280,7 +280,7 @@ tcp6_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) } inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; - if (ip6_mapped_addr_on && (inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) { + if (!ip6_v6only && (inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) { if (IN6_IS_ADDR_UNSPECIFIED(&sin6p->sin6_addr)) inp->inp_vflag |= INP_IPV4; else if (IN6_IS_ADDR_V4MAPPED(&sin6p->sin6_addr)) { @@ -333,8 +333,7 @@ tcp6_usr_listen(struct socket *so, struct thread *td) COMMON_START(); if (inp->inp_lport == 0) { inp->inp_vflag &= ~INP_IPV4; - if (ip6_mapped_addr_on && - (inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) + if (!ip6_v6only && (inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) inp->inp_vflag |= INP_IPV4; error = in6_pcbbind(inp, (struct sockaddr *)0, td); } @@ -408,8 +407,7 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td) if (IN6_IS_ADDR_V4MAPPED(&sin6p->sin6_addr)) { struct sockaddr_in sin; - if (!ip6_mapped_addr_on || - (inp->inp_flags & IN6P_IPV6_V6ONLY)) + if (ip6_v6only || (inp->inp_flags & IN6P_IPV6_V6ONLY)) return(EINVAL); in6_sin6_2_sin(&sin, sin6p); |
