diff options
author | shin <shin@FreeBSD.org> | 2000-04-01 22:35:47 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-04-01 22:35:47 +0000 |
commit | 09037f119d2c35c390f84835c3d3c3cf94edebac (patch) | |
tree | 7ddb7387fe3b1afce957dd83bcb7a07caca09946 /sys/netinet6 | |
parent | 79ce44e00159f8824aacf50b6227f404788f59ad (diff) | |
download | FreeBSD-src-09037f119d2c35c390f84835c3d3c3cf94edebac.zip FreeBSD-src-09037f119d2c35c390f84835c3d3c3cf94edebac.tar.gz |
Support per socket based IPv4 mapped IPv6 addr enable/disable control.
Submitted by: ume
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6_pcb.c | 4 | ||||
-rw-r--r-- | sys/netinet6/udp6_usrreq.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 341260a..73c169b 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -224,7 +224,7 @@ in6_pcbbind(inp, nam, p) (so->so_cred->cr_uid != t->inp_socket->so_cred->cr_uid)) return (EADDRINUSE); - if (ip6_mapped_addr_on != 0 && + if ((inp->inp_flags & IN6P_BINDV6ONLY) == 0 && IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { struct sockaddr_in sin; @@ -246,7 +246,7 @@ in6_pcbbind(inp, nam, p) lport, wild); if (t && (reuseport & t->inp_socket->so_options) == 0) return(EADDRINUSE); - if (ip6_mapped_addr_on != 0 && + if ((inp->inp_flags & IN6P_BINDV6ONLY) == 0 && IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { struct sockaddr_in sin; diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 15ba9a2..0ba04ab 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -670,7 +670,7 @@ udp6_bind(struct socket *so, struct sockaddr *nam, struct proc *p) inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; - if (ip6_mapped_addr_on && (inp->inp_flags & IN6P_BINDV6ONLY) == 0) { + if ((inp->inp_flags & IN6P_BINDV6ONLY) == 0) { struct sockaddr_in6 *sin6_p; sin6_p = (struct sockaddr_in6 *)nam; @@ -705,7 +705,7 @@ udp6_connect(struct socket *so, struct sockaddr *nam, struct proc *p) inp = sotoinpcb(so); if (inp == 0) return EINVAL; - if (ip6_mapped_addr_on) { + if ((inp->inp_flags & IN6P_BINDV6ONLY) == 0) { struct sockaddr_in6 *sin6_p; sin6_p = (struct sockaddr_in6 *)nam; @@ -794,7 +794,7 @@ udp6_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, return EINVAL; } - if (ip6_mapped_addr_on) { + if ((inp->inp_flags & IN6P_BINDV6ONLY) == 0) { int hasv4addr; struct sockaddr_in6 *sin6 = 0; |