From ae924d51c3a24c2083f8e2ffb3ff320d2971e47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Tue, 31 Mar 2026 17:35:14 +0100 Subject: [PATCH] ITS#10250 syncrepl: contextCSN can now be the last attribute in the list --- servers/slapd/syncrepl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 0303a2e82e..4a94773686 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -5992,8 +5992,15 @@ void syncrepl_diff_entry( Operation *op, Attribute *old, Attribute *new, /* These are all missing from provider */ while ( old ) { - Modifications *mod = ch_malloc( sizeof( Modifications ) ); + Modifications *mod; + /* Skip contextCSN we screen ourselves */ + if ( is_ctx && old->a_desc == slap_schema.si_ad_contextCSN ) { + old = old->a_next; + continue; + } + + mod = ch_malloc( sizeof( Modifications ) ); mod->sml_op = LDAP_MOD_DELETE; mod->sml_flags = 0; mod->sml_desc = old->a_desc;