summaryrefslogtreecommitdiff
path: root/source4/libcli/nbt/nameregister.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/nbt/nameregister.c')
-rw-r--r--source4/libcli/nbt/nameregister.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/libcli/nbt/nameregister.c b/source4/libcli/nbt/nameregister.c
index 4dac500780..4f3e046274 100644
--- a/source4/libcli/nbt/nameregister.c
+++ b/source4/libcli/nbt/nameregister.c
@@ -32,6 +32,7 @@ struct nbt_name_request *nbt_name_register_send(struct nbt_name_socket *nbtsock,
{
struct nbt_name_request *req;
struct nbt_name_packet *packet;
+ struct nbt_peer_socket dest;
packet = talloc_zero(nbtsock, struct nbt_name_packet);
if (packet == NULL) return NULL;
@@ -72,8 +73,10 @@ struct nbt_name_request *nbt_name_register_send(struct nbt_name_socket *nbtsock,
packet->additional[0].rdata.netbios.addresses[0].ipaddr =
talloc_strdup(packet->additional, io->in.address);
if (packet->additional[0].rdata.netbios.addresses[0].ipaddr == NULL) goto failed;
-
- req = nbt_name_request_send(nbtsock, io->in.dest_addr, lp_nbt_port(), packet,
+
+ dest.port = lp_nbt_port();
+ dest.addr = io->in.dest_addr;
+ req = nbt_name_request_send(nbtsock, &dest, packet,
io->in.timeout, io->in.retries, False);
if (req == NULL) goto failed;
@@ -102,7 +105,7 @@ NTSTATUS nbt_name_register_recv(struct nbt_name_request *req,
}
packet = req->replies[0].packet;
- io->out.reply_from = talloc_steal(mem_ctx, req->replies[0].reply_addr);
+ io->out.reply_from = talloc_steal(mem_ctx, req->replies[0].dest.addr);
if (packet->ancount != 1 ||
packet->answers[0].rr_type != NBT_QTYPE_NETBIOS ||