From: Jorge Pereira Date: Fri, 26 May 2023 01:54:24 +0000 (-0300) Subject: make BFD use flat or nested attributes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7382287a48f47fede9e2be3d8078bdbdc2f67906;p=thirdparty%2Ffreeradius-server.git make BFD use flat or nested attributes --- diff --git a/src/listen/bfd/proto_bfd.c b/src/listen/bfd/proto_bfd.c index d8a26d0b579..f225d89a939 100644 --- a/src/listen/bfd/proto_bfd.c +++ b/src/listen/bfd/proto_bfd.c @@ -253,8 +253,8 @@ static int mod_decode(UNUSED void const *instance, request_t *request, uint8_t * reply = fr_pair_copy(request->reply_ctx, vp); fr_pair_append(&request->reply_pairs, reply); - my = fr_pair_find_by_da(&reply->vp_group, NULL, attr_my_discriminator); - your = fr_pair_find_by_da(&reply->vp_group, NULL, attr_your_discriminator); + my = fr_pair_find_by_da_nested(&reply->vp_group, NULL, attr_my_discriminator); + your = fr_pair_find_by_da_nested(&reply->vp_group, NULL, attr_your_discriminator); if (my && your) { uint32_t tmp = your->vp_uint32; diff --git a/src/process/bfd/base.c b/src/process/bfd/base.c index af4207ebf1a..35b0f7cc5e8 100644 --- a/src/process/bfd/base.c +++ b/src/process/bfd/base.c @@ -139,7 +139,7 @@ RESUME_NO_MCTX(recv_bfd) state = vp->vp_uint32; } else { vp = fr_pair_find_by_da(&request->reply_pairs, NULL, attr_bfd_packet); - if (vp) vp = fr_pair_find_by_da(&vp->vp_group, NULL, attr_bfd_state); + if (vp) vp = fr_pair_find_by_da_nested(&vp->vp_group, NULL, attr_bfd_state); if (vp) state = vp->vp_uint8; } }