Imported Upstream version 4.0.0+dfsg1
[abartlet/samba-debian.git] / source4 / nbt_server / wins / winsserver.c
index 1e6a0cfca878989cf22d3dab9ebc48b4524545b9..e9598bab8c4ed91fd0439f6837b3b234c8f3413e 100644 (file)
@@ -688,7 +688,7 @@ static void nbtd_wins_randomize1Clist(struct loadparm_context *lp_ctx,
                bool same;
 
                /* if the current one is in the same subnet, use it */
-               same = iface_same_net(addresses[idx], src->addr, mask);
+               same = iface_list_same_net(addresses[idx], src->addr, mask);
                if (same) {
                        sidx = idx;
                        break;
@@ -1038,7 +1038,7 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv)
        uint32_t tmp;
        const char *owner;
 
-       if (!lpcfg_wins_support(nbtsrv->task->lp_ctx)) {
+       if (!lpcfg_we_are_a_wins_server(nbtsrv->task->lp_ctx)) {
                nbtsrv->winssrv = NULL;
                return NT_STATUS_OK;
        }
@@ -1057,8 +1057,8 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv)
 
        if (owner == NULL) {
                struct interface *ifaces;
-               load_interfaces(nbtsrv->task, lpcfg_interfaces(nbtsrv->task->lp_ctx), &ifaces);
-               owner = iface_n_ip(ifaces, 0);
+               load_interface_list(nbtsrv->task, nbtsrv->task->lp_ctx, &ifaces);
+               owner = iface_list_first_v4(ifaces);
        }
 
        nbtsrv->winssrv->wins_db     = winsdb_connect(nbtsrv->winssrv, nbtsrv->task->event_ctx,