summaryrefslogtreecommitdiff
path: root/source4/nbt_server/wins/winswack.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/nbt_server/wins/winswack.c')
-rw-r--r--source4/nbt_server/wins/winswack.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/nbt_server/wins/winswack.c b/source4/nbt_server/wins/winswack.c
index 82b16bb20d..929155c842 100644
--- a/source4/nbt_server/wins/winswack.c
+++ b/source4/nbt_server/wins/winswack.c
@@ -27,6 +27,7 @@
#include "system/time.h"
#include "libcli/composite/composite.h"
#include "param/param.h"
+#include "smbd/service_task.h"
struct wins_challenge_state {
struct wins_challenge_io *io;
@@ -47,7 +48,7 @@ static void wins_challenge_handler(struct nbt_name_request *req)
if (state->current_address < state->io->in.num_addresses) {
struct nbtd_interface *iface;
- state->query.in.dest_port = lp_nbt_port(global_loadparm);
+ state->query.in.dest_port = state->io->in.nbt_port;
state->query.in.dest_addr = state->io->in.addresses[state->current_address];
iface = nbtd_find_request_iface(state->io->in.nbtd_server, state->query.in.dest_addr, true);
@@ -105,7 +106,7 @@ struct composite_context *wins_challenge_send(TALLOC_CTX *mem_ctx, struct wins_c
/* setup a name query to the first address */
state->query.in.name = *state->io->in.name;
- state->query.in.dest_port = lp_nbt_port(global_loadparm);
+ state->query.in.dest_port = state->io->in.nbt_port;
state->query.in.dest_addr = state->io->in.addresses[state->current_address];
state->query.in.broadcast = false;
state->query.in.wins_lookup = true;
@@ -162,6 +163,7 @@ static void wins_release_demand_handler(struct nbt_name_request *req)
if (state->current_address < state->io->in.num_addresses) {
struct nbtd_interface *iface;
+ state->release.in.dest_port = lp_nbt_port(state->io->in.nbtd_server->task->lp_ctx);
state->release.in.dest_addr = state->io->in.addresses[state->current_address];
state->release.in.address = state->release.in.dest_addr;
state->release.in.timeout = (state->addresses_left > 1 ? 2 : 1);
@@ -221,6 +223,7 @@ static struct composite_context *wins_release_demand_send(TALLOC_CTX *mem_ctx, s
* with 2 retries
*/
state->release.in.name = *state->io->in.name;
+ state->release.in.dest_port = lp_nbt_port(state->io->in.nbtd_server->task->lp_ctx);
state->release.in.dest_addr = state->io->in.addresses[state->current_address];
state->release.in.address = state->release.in.dest_addr;
state->release.in.broadcast = false;
@@ -303,6 +306,7 @@ NTSTATUS nbtd_proxy_wins_challenge(struct irpc_message *msg,
s->req = req;
s->io.in.nbtd_server = nbtd_server;
+ s->io.in.nbt_port = lp_nbt_port(global_loadparm);
s->io.in.event_ctx = msg->ev;
s->io.in.name = &req->in.name;
s->io.in.num_addresses = req->in.num_addrs;