set recursion desired for bcast name query
authorAndrew Tridgell <tridge@samba.org>
Wed, 14 Oct 1998 16:45:24 +0000 (16:45 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 14 Oct 1998 16:45:24 +0000 (16:45 +0000)
source/libsmb/namequery.c
source/utils/nmblookup.c

index 500618bd8a6e0d5b67a08c3dfab8c284b4752320..e95302fcd0c9d38e4d61f390ad337d474e5b9657 100644 (file)
@@ -446,7 +446,7 @@ static BOOL resolve_bcast(char *name, struct in_addr *return_ip, int name_type)
                        /* Done this way to fix compiler error on IRIX 5.x */
                        sendto_ip = *iface_bcast(*iface_n_ip(i));
                        iplist = name_query(sock, name, name_type, True, 
-                                           False, sendto_ip, &count, NULL);
+                                           True, sendto_ip, &count, NULL);
                        if(iplist != NULL) {
                                *return_ip = iplist[0];
                                free((char *)iplist);
index 477d6590f02fe17f4aa38e3db0daf7bbc2f970bc..971715f327c76e243c409ec68edb2464f3d73f43 100644 (file)
@@ -218,7 +218,8 @@ int main(int argc,char *argv[])
         sscanf(p+1,"%x",&lookup_type);
       }
 
-      if ((ip_list = name_query(ServerFD,lookup,lookup_type,use_bcast,recursion_desired,
+      if ((ip_list = name_query(ServerFD,lookup,lookup_type,use_bcast,
+                               use_bcast?True:recursion_desired,
                                bcast_addr,&count,NULL))) {
              for (j=0;j<count;j++)
                      printf("%s %s<%02x>\n",inet_ntoa(ip_list[j]),lookup, lookup_type);