summaryrefslogtreecommitdiff
path: root/source4/wrepl_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/wrepl_server')
-rw-r--r--source4/wrepl_server/wrepl_in_connection.c12
-rw-r--r--source4/wrepl_server/wrepl_scavenging.c2
-rw-r--r--source4/wrepl_server/wrepl_server.c6
3 files changed, 13 insertions, 7 deletions
diff --git a/source4/wrepl_server/wrepl_in_connection.c b/source4/wrepl_server/wrepl_in_connection.c
index 9d3ddbf0da..962a1cb7fa 100644
--- a/source4/wrepl_server/wrepl_in_connection.c
+++ b/source4/wrepl_server/wrepl_in_connection.c
@@ -441,16 +441,19 @@ NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service, struct loadpar
int i;
struct interface *ifaces;
- load_interfaces(task, lpcfg_interfaces(lp_ctx), &ifaces);
+ load_interface_list(task, lp_ctx, &ifaces);
- num_interfaces = iface_count(ifaces);
+ num_interfaces = iface_list_count(ifaces);
/* We have been given an interfaces line, and been
told to only bind to those interfaces. Create a
socket per interface and bind to only these.
*/
for(i = 0; i < num_interfaces; i++) {
- address = iface_n_ip(ifaces, i);
+ if (!iface_list_n_is_v4(ifaces, i)) {
+ continue;
+ }
+ address = iface_list_n_ip(ifaces, i);
status = stream_setup_socket(task, task->event_ctx,
task->lp_ctx, model_ops,
&wreplsrv_stream_ops,
@@ -465,6 +468,9 @@ NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service, struct loadpar
}
} else {
address = lpcfg_socket_address(lp_ctx);
+ if (strcmp(address, "") == 0) {
+ address = "0.0.0.0";
+ }
status = stream_setup_socket(task, task->event_ctx, task->lp_ctx,
model_ops, &wreplsrv_stream_ops,
"ipv4", address, &port, lpcfg_socket_options(task->lp_ctx),
diff --git a/source4/wrepl_server/wrepl_scavenging.c b/source4/wrepl_server/wrepl_scavenging.c
index 18d4780c0b..d04064970c 100644
--- a/source4/wrepl_server/wrepl_scavenging.c
+++ b/source4/wrepl_server/wrepl_scavenging.c
@@ -306,7 +306,7 @@ static NTSTATUS wreplsrv_scavenging_replica_non_active_records(struct wreplsrv_s
}
struct verify_state {
- struct messaging_context *msg_ctx;
+ struct imessaging_context *msg_ctx;
struct wreplsrv_service *service;
struct winsdb_record *rec;
struct nbtd_proxy_wins_challenge r;
diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c
index 83510c73a8..79e0cfc24d 100644
--- a/source4/wrepl_server/wrepl_server.c
+++ b/source4/wrepl_server/wrepl_server.c
@@ -38,7 +38,7 @@ static struct ldb_context *wins_config_db_connect(TALLOC_CTX *mem_ctx,
struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx)
{
- return ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, private_path(mem_ctx,
+ return ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, lpcfg_private_path(mem_ctx,
lp_ctx, lpcfg_wins_config_url(lp_ctx)),
system_session(lp_ctx), NULL, 0);
}
@@ -78,8 +78,8 @@ static NTSTATUS wreplsrv_open_winsdb(struct wreplsrv_service *service,
if (owner == NULL) {
struct interface *ifaces;
- load_interfaces(service, lpcfg_interfaces(lp_ctx), &ifaces);
- owner = iface_n_ip(ifaces, 0);
+ load_interface_list(service, lp_ctx, &ifaces);
+ owner = iface_list_first_v4(ifaces);
}
service->wins_db = winsdb_connect(service, service->task->event_ctx, lp_ctx, owner, WINSDB_HANDLE_CALLER_WREPL);