From: Alan T. DeKok Date: Tue, 19 Nov 2019 19:45:48 +0000 (-0500) Subject: stop if we get to a sibling structure X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9656cf843a94dea1214732fc28fad5bfd00ce2ba;p=thirdparty%2Ffreeradius-server.git stop if we get to a sibling structure i.e. if we want to encode 2 of the same structs in a row --- diff --git a/src/lib/util/struct.c b/src/lib/util/struct.c index 07a603a2b2e..306ed6d2aee 100644 --- a/src/lib/util/struct.c +++ b/src/lib/util/struct.c @@ -586,7 +586,7 @@ ssize_t fr_struct_to_network(uint8_t *out, size_t outlen, * Nothing more to do, or we've done all of the * entries in this structure, stop. */ - if (!vp || (vp->da->parent != parent)) { + if (!vp || (vp->da->parent != parent) || (vp->da->attr < child_num)) { break; } }