fix ip6addr_aton for non-shortened ipv4 mapped addresses

This commit is contained in:
Simon Goldschmidt
2018-06-12 21:48:32 +02:00
parent eb91fdd861
commit 0c5133d7cf
2 changed files with 24 additions and 10 deletions

View File

@@ -82,7 +82,7 @@ ip6addr_aton(const char *cp, ip6_addr_t *addr)
zero_blocks--;
#if LWIP_IPV4
} else if (*s == '.') {
if (zero_blocks == 5) {
if ((zero_blocks == 5) ||(zero_blocks == 2)) {
check_ipv4_mapped = 1;
/* last block could be the start of an IPv4 address */
zero_blocks--;