diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-11 22:23:14 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:49:32 +0100 |
commit | 6f2252dace1629d7b5c5637b103caa28d2c89b07 (patch) | |
tree | fc09abaf04401ef510d55866066738840d052ebf /source4/libcli/resolve/nbtlist.c | |
parent | f9948d18d73fb8d8711c3b5a46b1d83c881a0084 (diff) | |
download | samba-6f2252dace1629d7b5c5637b103caa28d2c89b07.tar.gz samba-6f2252dace1629d7b5c5637b103caa28d2c89b07.tar.bz2 samba-6f2252dace1629d7b5c5637b103caa28d2c89b07.zip |
r26401: Don't cache interfaces context in libnetif.
(This used to be commit 9f975417cc66bfd4589da38bfd23731dbe0e6153)
Diffstat (limited to 'source4/libcli/resolve/nbtlist.c')
-rw-r--r-- | source4/libcli/resolve/nbtlist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/libcli/resolve/nbtlist.c b/source4/libcli/resolve/nbtlist.c index daa602f97c..6c12fe706b 100644 --- a/source4/libcli/resolve/nbtlist.c +++ b/source4/libcli/resolve/nbtlist.c @@ -49,6 +49,7 @@ static void nbtlist_handler(struct nbt_name_request *req) struct composite_context); struct nbtlist_state *state = talloc_get_type(c->private_data, struct nbtlist_state); struct nbt_name_query *q; + struct interface *ifaces; int i; for (i=0;i<state->num_queries;i++) { @@ -75,9 +76,10 @@ static void nbtlist_handler(struct nbt_name_request *req) } /* favor a local address if possible */ + load_interfaces(lp_interfaces(global_loadparm), &ifaces); state->reply_addr = NULL; for (i=0;i<q->out.num_addrs;i++) { - if (iface_is_local(global_loadparm, q->out.reply_addrs[i])) { + if (iface_is_local(ifaces, q->out.reply_addrs[i])) { state->reply_addr = talloc_steal(state, q->out.reply_addrs[i]); break; |