diff options
author | Yoshinobu Inoue <shin@FreeBSD.org> | 2000-04-01 22:35:47 +0000 |
---|---|---|
committer | Yoshinobu Inoue <shin@FreeBSD.org> | 2000-04-01 22:35:47 +0000 |
commit | fdaf052eb39719fbce3ee56289977a0721e2bd49 (patch) | |
tree | ced0becf90df81e230f848292a3b9c6beaade3a7 /sys/netinet6/udp6_usrreq.c | |
parent | 1f0118b915f51eedc16ea01b51f1d4bfba7b4727 (diff) | |
download | src-fdaf052eb39719fbce3ee56289977a0721e2bd49.tar.gz src-fdaf052eb39719fbce3ee56289977a0721e2bd49.zip |
Support per socket based IPv4 mapped IPv6 addr enable/disable control.
Submitted by: ume
Notes
Notes:
svn path=/head/; revision=58907
Diffstat (limited to 'sys/netinet6/udp6_usrreq.c')
-rw-r--r-- | sys/netinet6/udp6_usrreq.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 15ba9a2a3911..0ba04abc14a0 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; |