in set{peer, sock}addr, do not convert the unspecified
address (::) to the mapped address form. PR: kern/22868 Obtained from: KAME MFC after: 3 days
This commit is contained in:
parent
835fb61618
commit
5fac41781b
@ -561,7 +561,7 @@ in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam)
|
||||
|
||||
if (inp == NULL)
|
||||
return EINVAL;
|
||||
if (inp->inp_vflag & INP_IPV4) {
|
||||
if ((inp->inp_vflag & (INP_IPV4 | INP_IPV6)) == INP_IPV4) {
|
||||
error = in_setsockaddr(so, nam, &tcbinfo);
|
||||
if (error == 0)
|
||||
in6_sin_2_v4mapsin6_in_sock(nam);
|
||||
@ -581,7 +581,7 @@ in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam)
|
||||
|
||||
if (inp == NULL)
|
||||
return EINVAL;
|
||||
if (inp->inp_vflag & INP_IPV4) {
|
||||
if ((inp->inp_vflag & (INP_IPV4 | INP_IPV6)) == INP_IPV4) {
|
||||
error = in_setpeeraddr(so, nam, &tcbinfo);
|
||||
if (error == 0)
|
||||
in6_sin_2_v4mapsin6_in_sock(nam);
|
||||
|
Loading…
x
Reference in New Issue
Block a user