diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-07-12 06:27:51 +0200 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2009-07-16 19:13:00 +0200 |
commit | 3fa3f957e70f594cc2c1cac03644ddf48554c178 (patch) | |
tree | 86e63fd609afab8fc297e557b03cd4993f981ab2 /lib/sockunion.c | |
parent | [ospf6d] Fix regression in monotonic time patch - LSA max-aging broke (diff) | |
download | frr-3fa3f957e70f594cc2c1cac03644ddf48554c178.tar.xz frr-3fa3f957e70f594cc2c1cac03644ddf48554c178.zip |
[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.
Diffstat (limited to 'lib/sockunion.c')
-rw-r--r-- | lib/sockunion.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sockunion.c b/lib/sockunion.c index 75419b114..6a40f3321 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)); } |