From: Alan T. DeKok Date: Thu, 21 Jul 2022 13:46:44 +0000 (-0400) Subject: replace equal pairs on merge RHS X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e669ac5d0d4213a0aa4849f5377a0cd6fc0f2df6;p=thirdparty%2Ffreeradius-server.git replace equal pairs on merge RHS --- diff --git a/src/lib/util/edit.c b/src/lib/util/edit.c index faf5efe1897..5c17fad18b6 100644 --- a/src/lib/util/edit.c +++ b/src/lib/util/edit.c @@ -1093,11 +1093,20 @@ static int list_merge_rhs(fr_edit_list_t *el, fr_pair_t *dst, fr_pair_list_t *sr if (fr_type_is_structural(a->vp_type)) { rcode = list_merge_rhs(el, a, &b->children, copy); if (rcode < 0) return rcode; + + fr_dcursor_next(&cursor1); + fr_dcursor_next(&cursor2); + continue; } /* - * We have both A and B, so we prefer A. + * We have both A and B, so we prefer B. */ + COPY(b); + if (fr_edit_list_replace_pair(el, &dst->children, a, c) < 0) { + return -1; + } + fr_dcursor_next(&cursor1); fr_dcursor_next(&cursor2); }