From: Marco van Wieringen Date: Wed, 27 Jun 2012 13:32:38 +0000 (+0200) Subject: Add extra test for unsupported Protocol Families. X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=180052864c2e7ffe98fcea2503884808e6b695ad;p=bacula%2Fbacula Add extra test for unsupported Protocol Families. With getaddrinfo we could get back theorethically an protocol family that we don't support on the local client. Now we set our hints better we are probably safe but lets put in some extra safeguards. --- diff --git a/bacula/src/lib/bsock.c b/bacula/src/lib/bsock.c index 7ae4e45265..4df45e5934 100644 --- a/bacula/src/lib/bsock.c +++ b/bacula/src/lib/bsock.c @@ -239,10 +239,18 @@ bool BSOCK::open(JCR *jcr, const char *name, char *host, char *service, berrno be; save_errno = errno; switch (errno) { +#ifdef EPFNOSUPPORT + case EPFNOSUPPORT: + /* + * The name lookup of the host returned an address in a protocol family + * we don't support. Suppress the error and try the next address. + */ + break; +#endif #ifdef EAFNOSUPPORT case EAFNOSUPPORT: /* - * The name lookup of the host returned an address in a protocol family + * The name lookup of the host returned an address in a address family * we don't support. Suppress the error and try the next address. */ break;