diff options
-rw-r--r-- | sys/netinet6/in6_pcb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index b3d58e8..6b3f91b 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -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); |