diff options
Diffstat (limited to 'source4/torture/nbt/wins.c')
-rw-r--r-- | source4/torture/nbt/wins.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/torture/nbt/wins.c b/source4/torture/nbt/wins.c index 2ba7f221c9..cf115fcd75 100644 --- a/source4/torture/nbt/wins.c +++ b/source4/torture/nbt/wins.c @@ -54,8 +54,13 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address struct nbt_name_release release; NTSTATUS status; struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, NULL); - const char *myaddress = talloc_strdup(tctx, iface_best_ip(tctx->lp_ctx, address)); + const char *myaddress; struct socket_address *socket_address; + struct interface *ifaces; + + load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces); + + myaddress = talloc_strdup(tctx, iface_best_ip(ifaces, address)); socket_address = socket_address_from_strings(tctx, nbtsock->sock->backend_name, @@ -75,6 +80,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address torture_comment(tctx, "release the name\n"); release.in.name = *name; + release.in.dest_port = lp_nbt_port(tctx->lp_ctx); release.in.dest_addr = address; release.in.address = myaddress; release.in.nb_flags = nb_flags; @@ -88,6 +94,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address torture_comment(tctx, "register the name\n"); io.in.name = *name; + io.in.wins_port = lp_nbt_port(tctx->lp_ctx); io.in.wins_servers = str_list_make(tctx, address, NULL); io.in.addresses = str_list_make(tctx, myaddress, NULL); io.in.nb_flags = nb_flags; @@ -160,6 +167,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address torture_comment(tctx, "refresh the name\n"); refresh.in.name = *name; + refresh.in.wins_port = lp_nbt_port(tctx->lp_ctx); refresh.in.wins_servers = str_list_make(tctx, address, NULL); refresh.in.addresses = str_list_make(tctx, myaddress, NULL); refresh.in.nb_flags = nb_flags; |