From 3fa3f957e70f594cc2c1cac03644ddf48554c178 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Sat, 11 Jul 2009 21:27:51 -0700 Subject: [lib] Fix IPv6 normalisation * lib/sockunion.c: (sockunion_normalise_mapped) The code to normalize address was not copying port value - probably reason why IPV4 in IPV6 never worked right. --- lib/sockunion.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/sockunion.c b/lib/sockunion.c index 75419b11..6a40f332 100644 --- a/lib/sockunion.c +++ b/lib/sockunion.c @@ -238,6 +238,7 @@ sockunion_normalise_mapped (union sockunion *su) { memset (&sin, 0, sizeof (struct sockaddr_in)); sin.sin_family = AF_INET; + sin.sin_port = su->sin6.sin6_port; memcpy (&sin.sin_addr, ((char *)&su->sin6.sin6_addr) + 12, 4); memcpy (su, &sin, sizeof (struct sockaddr_in)); } -- cgit v1.2.1