fixed so that ] is accepted as end of IPv6 address

This commit is contained in:
Joakim Eriksson 2011-03-08 23:11:06 -05:00
parent 590b0a1696
commit 2baa6cf1b5

View file

@ -88,7 +88,7 @@ uiplib_ipaddrconv(const char *addrstr, uip_ipaddr_t *ipaddr)
value = (value << 4) + (tmp & 0xf); value = (value << 4) + (tmp & 0xf);
} }
} }
if(c != '\0') { if(c != '\0' && c != ']') {
PRINTF("uiplib: too large address\n"); PRINTF("uiplib: too large address\n");
return 0; return 0;
} }