r26401: Don't cache interfaces context in libnetif.
[samba.git] / source4 / libcli / wrepl / winsrepl.c
index 92543be487693a71a9d7b86d0d879fc3f0aa1933..15dc98f675c35f5a09a05d690c43722afc3ba637 100644 (file)
@@ -333,7 +333,9 @@ struct composite_context *wrepl_connect_send(struct wrepl_socket *wrepl_socket,
        state->wrepl_socket     = wrepl_socket;
 
        if (!our_ip) {
-               our_ip = iface_best_ip(global_loadparm, peer_ip);
+               struct interface *ifaces;
+               load_interfaces(lp_interfaces(global_loadparm), &ifaces);
+               our_ip = iface_best_ip(ifaces, peer_ip);
        }
 
        us = socket_address_from_strings(state, wrepl_socket->sock->backend_name,