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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124332
@ -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…
Reference in New Issue
Block a user