From b2579385de427c3c03d28520d3a93bd5f9bc9488 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 17 Mar 2002 16:08:39 +0000 Subject: [PATCH] Only unmap IPv6 addresses. --- src/netutl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netutl.c b/src/netutl.c index 95a168ca..c7c2a2d8 100644 --- a/src/netutl.c +++ b/src/netutl.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: netutl.c,v 1.12.4.29 2002/03/17 15:59:29 guus Exp $ + $Id: netutl.c,v 1.12.4.30 2002/03/17 16:08:39 guus Exp $ */ #include "config.h" @@ -173,7 +173,7 @@ cp void sockaddrunmap(sockaddr_t *sa) { - if(IN6_IS_ADDR_V4MAPPED(&sa->in6.sin6_addr)) + if(sa->sa.sa_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&sa->in6.sin6_addr)) { sa->in.sin_addr.s_addr = sa->in6.sin6_addr.s6_addr32[3]; sa->in.sin_family = AF_INET; -- 2.20.1