diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-10 18:41:41 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:49:13 +0100 |
commit | 77273e250cacb1df0e8bd676e0948175ccd2330a (patch) | |
tree | 6c71eae30f8bd1fa53a165a95d3526f34ed181f3 | |
parent | b6f66eb5e00ed01029fa81f408d6154ab01e74e7 (diff) | |
download | samba-77273e250cacb1df0e8bd676e0948175ccd2330a.tar.gz samba-77273e250cacb1df0e8bd676e0948175ccd2330a.tar.xz samba-77273e250cacb1df0e8bd676e0948175ccd2330a.zip |
r26380: Specify port number higher up the call stack.
-rw-r--r-- | source/libcli/nbt/libnbt.h | 1 | ||||
-rw-r--r-- | source/libcli/nbt/namerefresh.c | 6 | ||||
-rw-r--r-- | source/torture/nbt/register.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/source/libcli/nbt/libnbt.h b/source/libcli/nbt/libnbt.h index f4bb71764a3..88ca0e204bf 100644 --- a/source/libcli/nbt/libnbt.h +++ b/source/libcli/nbt/libnbt.h @@ -215,6 +215,7 @@ struct nbt_name_refresh { struct { struct nbt_name name; const char *dest_addr; + uint16_t dest_port; const char *address; uint16_t nb_flags; bool broadcast; diff --git a/source/libcli/nbt/namerefresh.c b/source/libcli/nbt/namerefresh.c index d723eed9f52..3e99854215c 100644 --- a/source/libcli/nbt/namerefresh.c +++ b/source/libcli/nbt/namerefresh.c @@ -69,7 +69,7 @@ struct nbt_name_request *nbt_name_refresh_send(struct nbt_name_socket *nbtsock, dest = socket_address_from_strings(nbtsock, nbtsock->sock->backend_name, - io->in.dest_addr, lp_nbt_port(global_loadparm)); + io->in.dest_addr, io->in.dest_port); if (dest == NULL) goto failed; req = nbt_name_request_send(nbtsock, dest, packet, io->in.timeout, io->in.retries, false); @@ -174,6 +174,7 @@ static void name_refresh_wins_handler(struct nbt_name_request *req) goto done; } state->io->in.dest_addr = state->wins_servers[0]; + state->io->in.dest_port = lp_nbt_port(global_loadparm); state->io->in.address = state->addresses[0]; state->req = nbt_name_refresh_send(state->nbtsock, state->io); if (state->req == NULL) { @@ -212,7 +213,7 @@ done: } } -/* +/** the async send call for a multi-server WINS refresh */ struct composite_context *nbt_name_refresh_wins_send(struct nbt_name_socket *nbtsock, @@ -240,6 +241,7 @@ struct composite_context *nbt_name_refresh_wins_send(struct nbt_name_socket *nbt state->io->in.name = io->in.name; state->io->in.dest_addr = state->wins_servers[0]; + state->io->in.dest_port = lp_nbt_port(global_loadparm); state->io->in.address = io->in.addresses[0]; state->io->in.nb_flags = io->in.nb_flags; state->io->in.broadcast = false; diff --git a/source/torture/nbt/register.c b/source/torture/nbt/register.c index cc3a55a7872..c7f992cbd60 100644 --- a/source/torture/nbt/register.c +++ b/source/torture/nbt/register.c @@ -26,6 +26,7 @@ #include "lib/socket/netif.h" #include "torture/torture.h" #include "torture/nbt/proto.h" +#include "param/param.h" #define CHECK_VALUE(tctx, v, correct) \ torture_assert_int_equal(tctx, v, correct, "Incorrect value") @@ -132,6 +133,7 @@ static bool nbt_refresh_own(struct torture_context *tctx) io.in.name = name; io.in.dest_addr = address; + io.in.dest_port = lp_nbt_port(tctx->lp_ctx); io.in.address = myaddress; io.in.nb_flags = NBT_NODE_B | NBT_NM_ACTIVE; io.in.broadcast = false; |