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);
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;
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));