From 1f9e4e739dfc112ea319b6e67aaf9c509e0bd167 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Tue, 19 May 2009 17:08:10 +0000 Subject: [PATCH] ebl Add patch for #1029 git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8842 91ce42f0-d328-0410-95d8-f526ca767f89 --- .../patches/3.0.1-ipv6-resolution-order.patch | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 bacula/patches/3.0.1-ipv6-resolution-order.patch diff --git a/bacula/patches/3.0.1-ipv6-resolution-order.patch b/bacula/patches/3.0.1-ipv6-resolution-order.patch new file mode 100644 index 0000000000..32d6bc150d --- /dev/null +++ b/bacula/patches/3.0.1-ipv6-resolution-order.patch @@ -0,0 +1,41 @@ + + This patch can be applied to version 3.0.1 and fixes a + IP address resolution priorities between ipv4 and ipv6. + This should fix bug #1029 + + Apply it to version 3.0.1 with: + + cd + patch -p0 <3.0.1-ipv6-resolution-order.patch + ./configure + make + ... + make install + + +Index: src/lib/bnet.c +=================================================================== +--- src/lib/bnet.c (révision 8841) ++++ src/lib/bnet.c (copie de travail) +@@ -495,13 +495,16 @@ + return 0; + } + } else { +- errmsg = resolv_host(AF_INET, host, addr_list); + #ifdef HAVE_IPV6 +- if (errmsg) { +- errmsg = resolv_host(AF_INET6, host, addr_list); +- } ++ /* We try to resolv host for ipv6 and ipv4, the connection procedure ++ * will try to reach the host for each protocols. We report only "Host ++ * not found" ipv4 message (no need to have ipv6 and ipv4 messages). ++ */ ++ resolv_host(AF_INET6, host, addr_list); + #endif +- if (errmsg) { ++ errmsg = resolv_host(AF_INET, host, addr_list); ++ ++ if (addr_list->size() == 0) { + *errstr = errmsg; + free_addresses(addr_list); + return 0; -- 2.39.5