int pass_count;
int fail_count;
const char *wins_server;
+ uint16_t wins_port;
const char *my_ip;
uint32_t ttl;
};
io.in.name = generate_name(tmp_ctx, idx);
io.in.dest_addr = state->wins_server;
+ io.in.dest_port = lp_nbt_port(global_loadparm);
io.in.address = state->my_ip;
io.in.nb_flags = NBT_NODE_H;
io.in.register_demand = false;
io.in.name = generate_name(tmp_ctx, idx);
io.in.dest_addr = state->wins_server;
- io.in.dest_port = lp_nbt_port(global_loadparm);
+ io.in.dest_port = state->wins_port;
io.in.broadcast = false;
io.in.wins_lookup = true;
io.in.timeout = 2;
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;
state->num_names = torture_entries;
state->registered = talloc_zero_array(state, bool, state->num_names);
state->wins_server = address;
- state->my_ip = talloc_strdup(tctx, iface_best_ip(tctx->lp_ctx, address));
+ state->wins_port = lp_nbt_port(tctx->lp_ctx);
+ 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,