diff options
author | Volker Lendecke <vl@samba.org> | 2011-05-02 23:39:09 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-06-05 14:08:01 +0200 |
commit | 10f5fa8a1e2272cf2388277b17e00082b2973216 (patch) | |
tree | 5675435d58521fab931dbd8fc09f7b9160f02780 /source3 | |
parent | 2d90a8994245b3611a508fed4ddcf0bd4ad978d9 (diff) | |
download | samba-10f5fa8a1e2272cf2388277b17e00082b2973216.tar.gz samba-10f5fa8a1e2272cf2388277b17e00082b2973216.tar.bz2 samba-10f5fa8a1e2272cf2388277b17e00082b2973216.zip |
s3: Make use of name_resolve_bcast in nmblookup
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/nmblookup.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c index f8545401e6..73db278e36 100644 --- a/source3/utils/nmblookup.c +++ b/source3/utils/nmblookup.c @@ -168,27 +168,9 @@ static bool query_one(const char *lookup, unsigned int lookup_type) &bcast_addr, talloc_tos(), &ip_list, &count, &flags); } else { - const struct in_addr *bcast; - for (j=iface_count() - 1; - !ip_list && j >= 0; - j--) { - char addr[INET6_ADDRSTRLEN]; - struct sockaddr_storage bcast_ss; - - bcast = iface_n_bcast_v4(j); - if (!bcast) { - continue; - } - in_addr_to_sockaddr_storage(&bcast_ss, *bcast); - print_sockaddr(addr, sizeof(addr), &bcast_ss); - d_printf("querying %s on %s\n", - lookup, addr); - status = name_query(lookup,lookup_type, - use_bcast, - use_bcast?True:recursion_desired, - &bcast_ss, talloc_tos(), - &ip_list, &count, &flags); - } + status = name_resolve_bcast( + lookup, lookup_type, + talloc_tos(), &ip_list, &count); } if (!NT_STATUS_IS_OK(status)) { |