From: Marco van Wieringen Date: Wed, 27 Jun 2012 13:32:38 +0000 (+0200) Subject: Add extra test for unsupported Protocol Families. X-Git-Tag: Release-5.2.10~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b1fce260b49f2f4656d0556cd42a4b98137f9688;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;