summaryrefslogtreecommitdiff
path: root/source4/torture/nbt/winsbench.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/nbt/winsbench.c')
-rw-r--r--source4/torture/nbt/winsbench.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c
index 82223d9dd7..1488c17757 100644
--- a/source4/torture/nbt/winsbench.c
+++ b/source4/torture/nbt/winsbench.c
@@ -87,6 +87,7 @@ static void generate_register(struct nbt_name_socket *nbtsock, struct wins_state
io.in.name = generate_name(tmp_ctx, idx);
io.in.dest_addr = state->wins_server;
+ io.in.dest_port = state->wins_port;
io.in.address = state->my_ip;
io.in.nb_flags = NBT_NODE_H;
io.in.register_demand = false;
@@ -138,6 +139,7 @@ static void generate_release(struct nbt_name_socket *nbtsock, struct wins_state
istate->state = state;
io.in.name = generate_name(tmp_ctx, idx);
+ io.in.dest_port = state->wins_port;
io.in.dest_addr = state->wins_server;
io.in.address = state->my_ip;
io.in.nb_flags = NBT_NODE_H;
@@ -233,6 +235,7 @@ static bool bench_wins(struct torture_context *tctx)
struct socket_address *my_ip;
struct nbt_name name;
const char *address;
+ struct interface *ifaces;
if (!torture_nbt_get_name(tctx, &name, &address))
return false;
@@ -243,7 +246,8 @@ static bool bench_wins(struct torture_context *tctx)
state->registered = talloc_zero_array(state, bool, state->num_names);
state->wins_server = address;
state->wins_port = lp_nbt_port(tctx->lp_ctx);
- state->my_ip = talloc_strdup(tctx, iface_best_ip(tctx->lp_ctx, address));
+ load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces);
+ state->my_ip = talloc_strdup(tctx, iface_best_ip(ifaces, address));
state->ttl = timelimit;
my_ip = socket_address_from_strings(nbtsock, nbtsock->sock->backend_name,