From: Alan T. DeKok Date: Fri, 7 Jul 2023 17:10:04 +0000 (-0400) Subject: use the correct cursor function for nested VPs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2a4d866016f7733b3e3c196cb23764c665bf6db;p=thirdparty%2Ffreeradius-server.git use the correct cursor function for nested VPs --- diff --git a/src/protocols/bfd/encode.c b/src/protocols/bfd/encode.c index 4cb1cfab827..0cf3cbfd81d 100644 --- a/src/protocols/bfd/encode.c +++ b/src/protocols/bfd/encode.c @@ -108,7 +108,10 @@ ssize_t fr_bfd_encode(uint8_t *out, size_t outlen, UNUSED uint8_t const *origina fr_dbuff_t work_dbuff = FR_DBUFF_TMP(out, outlen); fr_da_stack_t da_stack; - fr_pair_dcursor_init(&cursor, vps); + if (!fr_pair_dcursor_by_ancestor_init(&cursor, vps, attr_bfd_packet)) { + fr_strerror_const("No BFD attributes found in the list"); + return -1; + } packet_ctx.secret = secret;