From 85fd954145ab9262d5e1930bb7a93d70663abe33 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 14 Feb 2005 06:05:35 +0000 Subject: r5391: cope with w2k3 getting the timeout wrong in wack replies (This used to be commit 75766603e325d515a718b1d1ab0f08160ea1f790) --- source4/libcli/nbt/nbtsocket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/libcli') diff --git a/source4/libcli/nbt/nbtsocket.c b/source4/libcli/nbt/nbtsocket.c index dd14e76706..1d8cf36ea4 100644 --- a/source4/libcli/nbt/nbtsocket.c +++ b/source4/libcli/nbt/nbtsocket.c @@ -235,9 +235,9 @@ static void nbt_name_socket_recv(struct nbt_name_socket *nbtsock) has received our request */ req->num_retries = 0; req->received_wack = True; - if (packet->answers[0].ttl != 0) { - req->timeout = MIN(packet->answers[0].ttl, 20); - } + /* although there can be a timeout in the packet, w2k3 screws it up, + so better to set it ourselves */ + req->timeout = lp_parm_int(-1, "nbt", "wack_timeout", 30); req->te = event_add_timed(req->nbtsock->event_ctx, req, timeval_current_ofs(req->timeout, 0), nbt_name_socket_timeout, req); -- cgit