From 42a21f07849fa02c4120f68b241e5ebb22406b27 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Thu, 31 Jul 2025 13:22:02 -0400 Subject: [PATCH] use dictionary function to compare two attributes comparing by only the leaf attr was arguably wrong, as it ignored any depth or parenting. we use an fr_dict function to do the comparison. But that just compares the pointers, and isn't stable. Arguably that should be fixed, too. The fix depends on whether we want to just sort different attributes, or whether we want to order them. If we're just sorting them, then the current code is OK. --- src/lib/util/value.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/util/value.c b/src/lib/util/value.c index 0f0443f7e6..8156fc35b2 100644 --- a/src/lib/util/value.c +++ b/src/lib/util/value.c @@ -837,7 +837,7 @@ int8_t fr_value_box_cmp(fr_value_box_t const *a, fr_value_box_t const *b) return -2; case FR_TYPE_ATTR: - return CMP(a->vb_attr, b->vb_attr); + return fr_dict_attr_cmp(a->vb_attr, b->vb_attr); /* * These should be handled at some point -- 2.47.2