diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-02-07 11:56:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:09:35 -0500 |
commit | fcb78064bf760ab72d213b604cef9688edf42b92 (patch) | |
tree | c945ba52f9b23745d391acf8a1bdbf8439d01abd /source4/libcli | |
parent | d09311baa72c0ffa6768a379053dc0bfd38ecbdb (diff) | |
download | samba-fcb78064bf760ab72d213b604cef9688edf42b92.tar.gz samba-fcb78064bf760ab72d213b604cef9688edf42b92.tar.bz2 samba-fcb78064bf760ab72d213b604cef9688edf42b92.zip |
r5260: - show an error message on nmblookup failure
- always try to enable broadcast on nbt name sockets (this matches
samba3 behaviour better)
(This used to be commit 919bc14e7bbc04479cf11f7a7fd4c5e46616ef46)
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/nbt/nbtsocket.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source4/libcli/nbt/nbtsocket.c b/source4/libcli/nbt/nbtsocket.c index 3567224dea..f6566e8a6e 100644 --- a/source4/libcli/nbt/nbtsocket.c +++ b/source4/libcli/nbt/nbtsocket.c @@ -309,6 +309,8 @@ struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx, status = socket_create("ip", SOCKET_TYPE_DGRAM, &nbtsock->sock, 0); if (!NT_STATUS_IS_OK(status)) goto failed; + socket_set_option(nbtsock->sock, "SO_BROADCAST", "1"); + talloc_steal(nbtsock, nbtsock->sock); nbtsock->idr = idr_init(nbtsock); @@ -388,10 +390,6 @@ struct nbt_name_request *nbt_name_request_send(struct nbt_name_socket *nbtsock, DLIST_ADD_END(nbtsock->send_queue, req, struct nbt_name_request *); - if (request->operation & NBT_FLAG_BROADCAST) { - socket_set_option(nbtsock->sock, "SO_BROADCAST", "1"); - } - if (DEBUGLVL(10)) { DEBUG(10,("Queueing nbt packet to %s:%d\n", req->dest_addr, req->dest_port)); |