From: Matthew Iselin <[email protected]>
Signed-off-by: Matthew Iselin <[email protected]>
---
src/net/ipv6.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/net/ipv6.c b/src/net/ipv6.c
index 8d884db..5ce4e1a 100644
--- a/src/net/ipv6.c
+++ b/src/net/ipv6.c
@@ -379,6 +379,13 @@ char * inet6_ntoa ( struct in6_addr in6 ) {
uint16_t *bytes = ( uint16_t* ) &in6;
size_t i = 0, longest = 0, tmp = 0, long_idx = ~0;
+ /* ::0 */
+ if ( IP6_EQUAL ( in6, ip6_none ) ) {
+ tmp = sprintf ( buf, "::0" );
+ buf[tmp] = 0;
+ return buf;
+ }
+
/* Determine the longest string of zeroes for zero-compression. */
for ( ; i < 8; i++ ) {
if ( !bytes[i] )
--
1.7.2.5
_______________________________________________
gPXE-devel mailing list
[email protected]
http://etherboot.org/mailman/listinfo/gpxe-devel