s4-interfaces: allow pure ipv6 to work
authorMatthieu Patou <mat@matws.net>
Sat, 15 Oct 2011 09:13:40 +0000 (11:13 +0200)
committerMatthieu Patou <mat@matws.net>
Sat, 15 Oct 2011 22:01:36 +0000 (00:01 +0200)
This is the complementary part of patch
abe5afc580dcaaab70f136904d98fa83bfae7b6e for samba4.

source4/lib/socket/interface.c

index 7994716e83d875d76a8f2a20274b258ef3f0f3fa..27ac7151a3b18ae798c8db06339554dfe9dcffe7 100644 (file)
@@ -87,7 +87,8 @@ static void add_interface(TALLOC_CTX *mem_ctx, const struct iface_struct *ifs, s
                return;
        }
 
-       if (!(ifs->flags & (IFF_BROADCAST|IFF_LOOPBACK))) {
+       if (ifs->ip.ss_family == AF_INET &&
+               !(ifs->flags & (IFF_BROADCAST|IFF_LOOPBACK))) {
                DEBUG(3,("not adding non-broadcast interface %s\n",
                                        ifs->name ));
                return;