summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-11-19 23:50:02 +0000
committerAndrew Tridgell <tridge@samba.org>1997-11-19 23:50:02 +0000
commit6a6653f8152a0caf523639eca913f22431b2211a (patch)
tree7149c9704aa6869adbf8bebc5ef27ec4107c6cff /source3
parente4f9da8226fcd38106cba08dbe3c6ba2a62675f9 (diff)
downloadsamba-6a6653f8152a0caf523639eca913f22431b2211a.tar.gz
samba-6a6653f8152a0caf523639eca913f22431b2211a.tar.bz2
samba-6a6653f8152a0caf523639eca913f22431b2211a.zip
changed nmblookup to only set recursion_desired in queries if the -R
option is used. (This used to be commit 4561b8242e12c63401d008e7fdb2442457bd366d)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/namequery.c2
-rw-r--r--source3/utils/nmblookup.c12
2 files changed, 10 insertions, 4 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 55f70be122..15bf58bc55 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -214,7 +214,7 @@ BOOL name_query(int fd,char *name,int name_type,
nmb->header.response = False;
nmb->header.nm_flags.bcast = bcast;
nmb->header.nm_flags.recursion_available = False;
- nmb->header.nm_flags.recursion_desired = True;
+ nmb->header.nm_flags.recursion_desired = recurse;
nmb->header.nm_flags.trunc = False;
nmb->header.nm_flags.authoritative = False;
nmb->header.rcode = 0;
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c
index a44dad511e..1f74d7a130 100644
--- a/source3/utils/nmblookup.c
+++ b/source3/utils/nmblookup.c
@@ -77,7 +77,9 @@ static void usage(void)
printf("Version %s\n",VERSION);
printf("\t-d debuglevel set the debuglevel\n");
printf("\t-B broadcast address the address to use for broadcasts\n");
+ printf("\t-U unicast address the address to use for unicast\n");
printf("\t-M searches for a master browser\n");
+ printf("\t-R set recursion desired in packet\n");
printf("\t-S lookup node status as well\n");
printf("\t-r Use root port 137 (Win95 only replies to this)\n");
printf("\t-A Do a node status on <name> as an IP Address\n");
@@ -103,7 +105,8 @@ int main(int argc,char *argv[])
BOOL use_bcast = True;
BOOL got_bcast = False;
BOOL lookup_by_ip = False;
-
+ BOOL recursion_desired = False;
+
DEBUGLEVEL = 1;
*lookup = 0;
@@ -113,7 +116,7 @@ int main(int argc,char *argv[])
charset_initialise();
- while ((opt = getopt(argc, argv, "d:B:U:i:s:SMrhA")) != EOF)
+ while ((opt = getopt(argc, argv, "d:B:U:i:s:SMrhAR")) != EOF)
switch (opt)
{
case 'B':
@@ -138,6 +141,9 @@ int main(int argc,char *argv[])
case 'S':
find_status = True;
break;
+ case 'R':
+ recursion_desired = True;
+ break;
case 'd':
DEBUGLEVEL = atoi(optarg);
break;
@@ -213,7 +219,7 @@ int main(int argc,char *argv[])
retries = 1;
}
- if (name_query(ServerFD,lookup,lookup_type,use_bcast,True,
+ if (name_query(ServerFD,lookup,lookup_type,use_bcast,recursion_desired,
bcast_addr,&ip,NULL))
{
printf("%s %s\n",inet_ntoa(ip),lookup);