--- nmbd_subnetdb.c 2004-04-04 05:37:36.000000000 -0200 +++ ./patched/nmbd_subnetdb.c 2004-12-01 23:38:41.000000000 -0200 @@ -210,6 +210,7 @@ { int num_interfaces = iface_count(); int i; + int normal_subnet_count = 0; struct in_addr unicast_ip, ipzero; extern struct in_addr loopback_ip; @@ -223,6 +224,7 @@ } num_interfaces = iface_count(); + DEBUG(0,("load_interfaces(): found %d normal interfaces. \n", num_interfaces)); /* * Create subnets from all the local interfaces and thread them onto @@ -243,10 +245,26 @@ continue; } - if (!make_normal_subnet(iface)) - return False; + if (!make_normal_subnet(iface)) { + continue; + /* If at the end of this loop there were no normal subnets + * then return False. G.C. + */ + } else { + normal_subnet_count++; + DEBUG(3,("create_subnets: normal interface found at %s.\n",inet_ntoa(iface->ip))); + } } + +/* If no normal subnets found return False + GCD. */ + + if (normal_subnet_count == 0) + return False; + + DEBUG(3,("create_subnets: Total of %d normal subnets found.\n",normal_subnet_count)); + if (lp_we_are_a_wins_server()) { /* Pick the first interface ip address as the WINS server ip. */ unicast_ip = *iface_n_ip(0);