summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/wrepl_server/wrepl_out_helpers.c25
-rw-r--r--source4/wrepl_server/wrepl_server.c2
-rw-r--r--source4/wrepl_server/wrepl_server.h1
3 files changed, 25 insertions, 3 deletions
diff --git a/source4/wrepl_server/wrepl_out_helpers.c b/source4/wrepl_server/wrepl_out_helpers.c
index e1e3f38b12..d9a9684c79 100644
--- a/source4/wrepl_server/wrepl_out_helpers.c
+++ b/source4/wrepl_server/wrepl_out_helpers.c
@@ -77,10 +77,15 @@ static NTSTATUS wreplsrv_out_connect_wait_assoc_ctx(struct wreplsrv_out_connect_
NT_STATUS_NOT_OK_RETURN(status);
state->wreplconn->assoc_ctx.peer_ctx = state->assoc_io.out.assoc_ctx;
+ state->wreplconn->assoc_ctx.peer_major = state->assoc_io.out.major_version;
if (state->type == WINSREPL_PARTNER_PUSH) {
- state->wreplconn->partner->push.wreplconn = state->wreplconn;
- talloc_steal(state->wreplconn->partner, state->wreplconn);
+ if (state->wreplconn->assoc_ctx.peer_major >= 5) {
+ state->wreplconn->partner->push.wreplconn = state->wreplconn;
+ talloc_steal(state->wreplconn->partner, state->wreplconn);
+ } else {
+ state->type = WINSREPL_PARTNER_NONE;
+ }
} else if (state->type == WINSREPL_PARTNER_PULL) {
state->wreplconn->partner->pull.wreplconn = state->wreplconn;
talloc_steal(state->wreplconn->partner, state->wreplconn);
@@ -966,6 +971,22 @@ static NTSTATUS wreplsrv_push_notify_wait_connect(struct wreplsrv_push_notify_st
status = wreplsrv_out_connect_recv(state->creq, state, &state->wreplconn);
NT_STATUS_NOT_OK_RETURN(status);
+ /* is the peer doesn't support inform fallback to update */
+ switch (state->command) {
+ case WREPL_REPL_INFORM:
+ if (state->wreplconn->assoc_ctx.peer_major < 5) {
+ state->command = WREPL_REPL_UPDATE;
+ }
+ break;
+ case WREPL_REPL_INFORM2:
+ if (state->wreplconn->assoc_ctx.peer_major < 5) {
+ state->command = WREPL_REPL_UPDATE2;
+ }
+ break;
+ default:
+ break;
+ }
+
switch (state->command) {
case WREPL_REPL_UPDATE:
state->full_table = true;
diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c
index 393712c76a..5e100f46cc 100644
--- a/source4/wrepl_server/wrepl_server.c
+++ b/source4/wrepl_server/wrepl_server.c
@@ -207,7 +207,7 @@ NTSTATUS wreplsrv_load_partners(struct wreplsrv_service *service)
WINSREPL_DEFAULT_PULL_RETRY_INTERVAL);
partner->push.change_count = ldb_msg_find_attr_as_uint(res->msgs[i], "pushChangeCount",
WINSREPL_DEFAULT_PUSH_CHANGE_COUNT);
- partner->push.use_inform = ldb_msg_find_attr_as_uint(res->msgs[i], "pushUseInform", false);
+ partner->push.use_inform = ldb_msg_find_attr_as_uint(res->msgs[i], "pushUseInform", true);
DEBUG(3,("wreplsrv_load_partners: found partner: %s type: 0x%X\n",
partner->address, partner->type));
diff --git a/source4/wrepl_server/wrepl_server.h b/source4/wrepl_server/wrepl_server.h
index 7ee5a80624..d92e524c35 100644
--- a/source4/wrepl_server/wrepl_server.h
+++ b/source4/wrepl_server/wrepl_server.h
@@ -79,6 +79,7 @@ struct wreplsrv_out_connection {
struct {
uint32_t our_ctx;
uint32_t peer_ctx;
+ uint16_t peer_major;
} assoc_ctx;
/*