From 9656cf843a94dea1214732fc28fad5bfd00ce2ba Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Tue, 19 Nov 2019 14:45:48 -0500 Subject: [PATCH] stop if we get to a sibling structure i.e. if we want to encode 2 of the same structs in a row --- src/lib/util/struct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- 2.47.3