From 45070831485eb533ae577af452a389c5aa440bbc Mon Sep 17 00:00:00 2001 From: Ivan Delamer Date: Thu, 4 Aug 2011 14:18:33 -0600 Subject: [PATCH] Fixed bug in serialization of IPv6 addresses. Change-Id: Ib63540123803317ec25f7cbf580c5159e4100222 --- src/core/ipv6/ip6_addr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/ipv6/ip6_addr.c b/src/core/ipv6/ip6_addr.c index 3b682051..6c047491 100644 --- a/src/core/ipv6/ip6_addr.c +++ b/src/core/ipv6/ip6_addr.c @@ -208,6 +208,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen) } else { buf[i++] = xchar(((current_block_value & 0xf000) >> 12)); + zero_flag = 0; if (i >= buflen) return NULL; } @@ -216,6 +217,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen) } else { buf[i++] = xchar(((current_block_value & 0xf00) >> 8)); + zero_flag = 0; if (i >= buflen) return NULL; } @@ -224,6 +226,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen) } else { buf[i++] = xchar(((current_block_value & 0xf0) >> 4)); + zero_flag = 0; if (i >= buflen) return NULL; }