|
@@ -1650,9 +1650,15 @@ int attribute_hidden __read_etc_hosts_r(FILE * fp, const char * name, int type,
|
|
ret = NETDB_SUCCESS;
|
|
ret = NETDB_SUCCESS;
|
|
#endif /* __UCLIBC_HAS_IPV6__ */
|
|
#endif /* __UCLIBC_HAS_IPV6__ */
|
|
} else {
|
|
} else {
|
|
- DPRINTF("Error\n");
|
|
|
|
|
|
+ /* continue parsing in the hope the user has multiple
|
|
|
|
+ * host types listed in the database like so:
|
|
|
|
+ * <ipv4 addr> host
|
|
|
|
+ * <ipv6 addr> host
|
|
|
|
+ * If looking for an IPv6 addr, don't bail when we got the IPv4
|
|
|
|
+ */
|
|
|
|
+ DPRINTF("Error: Found host but diff network type\n");
|
|
ret = TRY_AGAIN;
|
|
ret = TRY_AGAIN;
|
|
- break; /* bad ip address */
|
|
|
|
|
|
+ continue;
|
|
}
|
|
}
|
|
|
|
|
|
if (action != GETHOSTENT)
|
|
if (action != GETHOSTENT)
|