summaryrefslogtreecommitdiff
path: root/source4/libcli/nbt
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/nbt')
-rw-r--r--source4/libcli/nbt/namequery.c2
-rw-r--r--source4/libcli/nbt/namerefresh.c4
-rw-r--r--source4/libcli/nbt/nameregister.c4
-rw-r--r--source4/libcli/nbt/nbtsocket.c4
4 files changed, 9 insertions, 5 deletions
diff --git a/source4/libcli/nbt/namequery.c b/source4/libcli/nbt/namequery.c
index 36fbfc8dd0..d77482fc2b 100644
--- a/source4/libcli/nbt/namequery.c
+++ b/source4/libcli/nbt/namequery.c
@@ -102,7 +102,7 @@ NTSTATUS nbt_name_query_recv(struct nbt_name_request *req,
}
for (i=0;i<io->out.num_addrs;i++) {
- in.s_addr = htonl(packet->answers[0].rdata.netbios.addresses[i].ipaddr);
+ in.s_addr = htonl(packet->answers[0].rdata.netbios.addresses[i].ipaddr.addr);
addr = inet_ntoa(in);
if (addr == NULL) {
talloc_free(req);
diff --git a/source4/libcli/nbt/namerefresh.c b/source4/libcli/nbt/namerefresh.c
index 47fcae4f7c..c121d9c920 100644
--- a/source4/libcli/nbt/namerefresh.c
+++ b/source4/libcli/nbt/namerefresh.c
@@ -64,7 +64,7 @@ struct nbt_name_request *nbt_name_refresh_send(struct nbt_name_socket *nbtsock,
struct nbt_rdata_address, 1);
if (packet->additional[0].rdata.netbios.addresses == NULL) goto failed;
packet->additional[0].rdata.netbios.addresses[0].nb_flags = io->in.nb_flags;
- packet->additional[0].rdata.netbios.addresses[0].ipaddr = htonl(inet_addr(io->in.address));
+ packet->additional[0].rdata.netbios.addresses[0].ipaddr.addr = htonl(inet_addr(io->in.address));
req = nbt_name_request_send(nbtsock, io->in.dest_addr, lp_nbt_port(), packet,
timeval_current_ofs(io->in.timeout, 0), False);
@@ -112,7 +112,7 @@ NTSTATUS nbt_name_refresh_recv(struct nbt_name_request *req,
talloc_free(req);
return NT_STATUS_INVALID_NETWORK_RESPONSE;
}
- in.s_addr = htonl(packet->answers[0].rdata.netbios.addresses[0].ipaddr);
+ in.s_addr = htonl(packet->answers[0].rdata.netbios.addresses[0].ipaddr.addr);
addr = inet_ntoa(in);
if (addr == NULL) {
talloc_free(req);
diff --git a/source4/libcli/nbt/nameregister.c b/source4/libcli/nbt/nameregister.c
index 7e0134c283..7bed37cf78 100644
--- a/source4/libcli/nbt/nameregister.c
+++ b/source4/libcli/nbt/nameregister.c
@@ -67,7 +67,7 @@ struct nbt_name_request *nbt_name_register_send(struct nbt_name_socket *nbtsock,
struct nbt_rdata_address, 1);
if (packet->additional[0].rdata.netbios.addresses == NULL) goto failed;
packet->additional[0].rdata.netbios.addresses[0].nb_flags = io->in.nb_flags;
- packet->additional[0].rdata.netbios.addresses[0].ipaddr = htonl(inet_addr(io->in.address));
+ packet->additional[0].rdata.netbios.addresses[0].ipaddr.addr = htonl(inet_addr(io->in.address));
req = nbt_name_request_send(nbtsock, io->in.dest_addr, lp_nbt_port(), packet,
timeval_current_ofs(io->in.timeout, 0), False);
@@ -115,7 +115,7 @@ NTSTATUS nbt_name_register_recv(struct nbt_name_request *req,
talloc_free(req);
return NT_STATUS_INVALID_NETWORK_RESPONSE;
}
- in.s_addr = htonl(packet->answers[0].rdata.netbios.addresses[0].ipaddr);
+ in.s_addr = htonl(packet->answers[0].rdata.netbios.addresses[0].ipaddr.addr);
addr = inet_ntoa(in);
if (addr == NULL) {
talloc_free(req);
diff --git a/source4/libcli/nbt/nbtsocket.c b/source4/libcli/nbt/nbtsocket.c
index 3f16bf6921..3d1397e019 100644
--- a/source4/libcli/nbt/nbtsocket.c
+++ b/source4/libcli/nbt/nbtsocket.c
@@ -390,6 +390,10 @@ NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock,
talloc_set_destructor(req, nbt_name_request_destructor);
+ if (DEBUGLVL(10)) {
+ NDR_PRINT_DEBUG(nbt_name_packet, request);
+ }
+
status = ndr_push_struct_blob(&req->encoded, req, request,
(ndr_push_flags_fn_t)ndr_push_nbt_name_packet);
if (!NT_STATUS_IS_OK(status)) {