Comment 8 for bug 54918

Revision history for this message
Greg Franklin (greg-franklin-wmrdc) wrote :

As far as I've found, there are two points where IPv6 Fails.

Firstly, in the use of gethostbyname. You'll need to install libsocket6-perl. I tried getnameinfo, but for some reason that didn't work so I've used getaddrinfo:

=== modified file 'bin/BackupPC_dump'
--- bin/BackupPC_dump 2008-06-30 11:20:59 +0000
+++ bin/BackupPC_dump 2010-07-16 13:54:27 +0000
@@ -91,6 +91,7 @@
 use File::Path;
 use File::Find;
 use Getopt::Std;
+use Socket6;

 ###########################################################################
 # Initialize
@@ -247,7 +248,8 @@
     } else {
         $host = $client;
     }
- if ( !defined(gethostbyname($host)) ) {
+
+ if ( defined(getaddrinfo($host,"22")) ) {
         #
         # Ok, NS doesn't know about it. Maybe it is a NetBios name
         # instead.

Secondly, is the use of ping in CheckHostAlive in lib/BackupPC/Lib.pm
If you are IPv6 only, you can change $Conf{PingPath} to /bin/pin6 in config.pl
The alternative is to change $Conf{PingCmd} to '' in config.pl which skips the ping test.