diff options
-rw-r--r-- | src/network/getaddrinfo.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/network/getaddrinfo.c b/src/network/getaddrinfo.c index ba26847a..e33bfa28 100644 --- a/src/network/getaddrinfo.c +++ b/src/network/getaddrinfo.c @@ -76,7 +76,16 @@ int getaddrinfo(const char *restrict host, const char *restrict serv, const stru close(s); if (!r) continue; } - if (errno != EAFNOSUPPORT) return EAI_SYSTEM; + switch (errno) { + case EADDRNOTAVAIL: + case EAFNOSUPPORT: + case EHOSTUNREACH: + case ENETDOWN: + case ENETUNREACH: + break; + default: + return EAI_SYSTEM; + } if (family == tf[i]) return EAI_NONAME; family = tf[1-i]; } |