return -2;
case FR_TYPE_ATTR:
+ /*
+ * @todo - this makes things _distinct_, but doesn't provide a _full_ order. We
+ * generally don't need a full ordering for attributes.
+ *
+ * The need to call fr_dict_attr_cmp() here is for comparing raw / unknown attributes
+ * which come from xlats. Unknown / raw attributes which are in policies are added to
+ * the dictionaries when the server starts, and are thus known.
+ */
return fr_dict_attr_cmp(a->vb_attr, b->vb_attr);
/*
{ L("prefix"), { .func = dict_flag_prefix } }
};
+/*
+ * @todo - arguably we don't want to mutate the input list.
+ * Instead, the encoder should just do 3 passes, where middle one
+ * ignores the message-type and option 82.
+ */
int8_t fr_dhcpv4_attr_cmp(void const *a, void const *b)
{
fr_pair_t const *my_a = a, *my_b = b;