]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add optional dict_attr to encode / decode ctx alloc signature
authorNick Porter <nick@portercomputing.co.uk>
Wed, 15 Oct 2025 16:36:43 +0000 (17:36 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 16 Oct 2025 17:26:37 +0000 (18:26 +0100)
To allow a root DA to be specified for the encoding / decoding context

26 files changed:
src/bin/fuzzer.c
src/bin/unit_test_attribute.c
src/lib/eap_aka_sim/decode.c
src/lib/eap_aka_sim/encode.c
src/lib/io/test_point.h
src/lib/unlang/xlat_builtin.c
src/lib/util/fuzzer.c
src/protocols/arp/base.c
src/protocols/bfd/decode.c
src/protocols/bfd/encode.c
src/protocols/cbor/base.c
src/protocols/der/decode.c
src/protocols/der/encode.c
src/protocols/dhcpv4/decode.c
src/protocols/dhcpv4/encode.c
src/protocols/dhcpv6/decode.c
src/protocols/dhcpv6/encode.c
src/protocols/dns/decode.c
src/protocols/dns/encode.c
src/protocols/radius/decode.c
src/protocols/radius/encode.c
src/protocols/tacacs/decode.c
src/protocols/tacacs/encode.c
src/protocols/tftp/decode.c
src/protocols/tftp/encode.c
src/protocols/vmps/vmps.c

index a36eca7dd1dd1c864b4b9645839b8966bb85a294..2fdafeb3b51305e1e8ff14d52d26c25e9f02bc3d 100644 (file)
@@ -264,7 +264,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len)
        fr_pair_list_init(&vps);
        if (!init) LLVMFuzzerInitialize(NULL, NULL);
 
-       if (tp->test_ctx && (tp->test_ctx(&decode_ctx, NULL, dict) < 0)) {
+       if (tp->test_ctx && (tp->test_ctx(&decode_ctx, NULL, dict, NULL) < 0)) {
                fr_perror("fuzzer: Failed initializing test point decode_ctx");
                fr_exit_now(EXIT_FAILURE);
        }
index 95d8dcf0d069fb27426e9257c2d67e9f495afe89..b4b2d473fc4483d9242a08db5ff829173e7be96d 100644 (file)
@@ -1662,7 +1662,7 @@ static size_t command_decode_pair(command_result_t *result, command_file_ctx_t *
        p += slen;
        fr_skip_whitespace(p);
 
-       if (tp->test_ctx && (tp->test_ctx(&decode_ctx, cc->tmp_ctx, dictionary_current(cc)) < 0)) {
+       if (tp->test_ctx && (tp->test_ctx(&decode_ctx, cc->tmp_ctx, dictionary_current(cc), NULL) < 0)) {
                fr_strerror_const_push("Failed initialising decoder testpoint");
                RETURN_COMMAND_ERROR();
        }
@@ -1763,7 +1763,7 @@ static size_t command_decode_proto(command_result_t *result, command_file_ctx_t
        p += slen;
        fr_skip_whitespace(p);
 
-       if (tp->test_ctx && (tp->test_ctx(&decode_ctx, cc->tmp_ctx, dictionary_current(cc)) < 0)) {
+       if (tp->test_ctx && (tp->test_ctx(&decode_ctx, cc->tmp_ctx, dictionary_current(cc), NULL) < 0)) {
                fr_strerror_const_push("Failed initialising decoder testpoint");
                RETURN_COMMAND_ERROR();
        }
@@ -1996,7 +1996,7 @@ static size_t command_encode_pair(command_result_t *result, command_file_ctx_t *
                fr_skip_whitespace(p);
        }
 
-       if (tp->test_ctx && (tp->test_ctx(&encode_ctx, cc->tmp_ctx, dictionary_current(cc)) < 0)) {
+       if (tp->test_ctx && (tp->test_ctx(&encode_ctx, cc->tmp_ctx, dictionary_current(cc), NULL) < 0)) {
                fr_strerror_const_push("Failed initialising encoder testpoint");
                CLEAR_TEST_POINT(cc);
                RETURN_COMMAND_ERROR();
@@ -2215,7 +2215,7 @@ static size_t command_encode_proto(command_result_t *result, command_file_ctx_t
 
        p += ((size_t)slen);
        fr_skip_whitespace(p);
-       if (tp->test_ctx && (tp->test_ctx(&encode_ctx, cc->tmp_ctx, dictionary_current(cc)) < 0)) {
+       if (tp->test_ctx && (tp->test_ctx(&encode_ctx, cc->tmp_ctx, dictionary_current(cc), NULL) < 0)) {
                fr_strerror_const_push("Failed initialising encoder testpoint");
                CLEAR_TEST_POINT(cc);
                RETURN_COMMAND_ERROR();
index 2b18253a25906232dab9609c3b4a897bf5b37d4b..b287b445abdf626ab435d0069e62ade98a783b2d 100644 (file)
@@ -1023,7 +1023,8 @@ static fr_aka_sim_ctx_t *test_ctx_init(TALLOC_CTX *ctx, uint8_t const *k_encr, s
 /*
  *     Test ctx data
  */
-static int decode_test_ctx_sim(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int decode_test_ctx_sim(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                              UNUSED fr_dict_attr_t const *root_da)
 {
        fr_aka_sim_ctx_t        *test_ctx;
        static uint8_t          k_encr[] = { 0x00, 0x01, 0x02, 0x03, 0x04 ,0x05, 0x06, 0x07,
@@ -1040,7 +1041,8 @@ static int decode_test_ctx_sim(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t con
 }
 
 
-static int decode_test_ctx_aka(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int decode_test_ctx_aka(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                              UNUSED fr_dict_attr_t const *root_da)
 {
        fr_aka_sim_ctx_t *test_ctx;
        static uint8_t          k_encr[] = { 0x00, 0x01, 0x02, 0x03, 0x04 ,0x05, 0x06, 0x07,
@@ -1056,7 +1058,8 @@ static int decode_test_ctx_aka(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t con
        return 0;
 }
 
-static int decode_test_ctx_sim_rfc4186(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int decode_test_ctx_sim_rfc4186(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                                      UNUSED fr_dict_attr_t const *root_da)
 {
        fr_aka_sim_ctx_t *test_ctx;
        static uint8_t          k_encr[] = { 0x53, 0x6e, 0x5e, 0xbc, 0x44 ,0x65, 0x58, 0x2a,
index 5a9578f43179b8a96f7e5cae82a65f49f0aaee38..96b505f775c8e75f75f5bd51888877ebb98b1531 100644 (file)
@@ -1020,7 +1020,8 @@ static fr_aka_sim_ctx_t *test_ctx_init(TALLOC_CTX *ctx, uint8_t const *k_encr, s
 /*
  *     Test ctx data
  */
-static int encode_test_ctx_sim(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int encode_test_ctx_sim(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                              UNUSED fr_dict_attr_t const *root_da)
 {
        fr_aka_sim_ctx_t        *test_ctx;
        static uint8_t          k_encr[] = { 0x00, 0x01, 0x02, 0x03, 0x04 ,0x05, 0x06, 0x07,
@@ -1036,7 +1037,8 @@ static int encode_test_ctx_sim(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t con
        return 0;
 }
 
-static int encode_test_ctx_aka(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int encode_test_ctx_aka(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                              UNUSED fr_dict_attr_t const *root_da)
 {
        fr_aka_sim_ctx_t        *test_ctx;
        static uint8_t          k_encr[] = { 0x00, 0x01, 0x02, 0x03, 0x04 ,0x05, 0x06, 0x07,
@@ -1052,7 +1054,8 @@ static int encode_test_ctx_aka(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t con
        return 0;
 }
 
-static int encode_test_ctx_sim_rfc4186(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int encode_test_ctx_sim_rfc4186(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                                      UNUSED fr_dict_attr_t const *root_da)
 {
        fr_aka_sim_ctx_t        *test_ctx;
        static uint8_t          k_encr[] = { 0x53, 0x6e, 0x5e, 0xbc, 0x44 ,0x65, 0x58, 0x2a,
index 584bf1d74fc14276f716e1e2a034acca12f4d733..60a335f16c3e1194abffd8bab63a9f18fc624466 100644 (file)
  * @param[out] out     Where the decoder context should be written.
  * @param[in] ctx      to allocate the test point context in.
  * @param[in] dict     the default dictionary context for the test point
+ * @param[in] root_da  Optional root DA for the encoder/decoder ctx.
  * @return proto or pair encoder or decoder ctx.
  */
-typedef int (*fr_test_point_ctx_alloc_t)(void **out, TALLOC_CTX *ctx, fr_dict_t const *dict);
+typedef int (*fr_test_point_ctx_alloc_t)(void **out, TALLOC_CTX *ctx, fr_dict_t const *dict, fr_dict_attr_t const *root_da);
 
 /** A generic interface for decoding packets to fr_pair_ts
  *
index a28f9200b65a9670403e5f4713fd2383bd86ecba..6ef1392fe9fa9157ff4671d511758f7b030886b7 100644 (file)
@@ -4071,7 +4071,7 @@ static xlat_action_t protocol_decode_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
        }
 
        if (tp_decode->test_ctx) {
-               if (tp_decode->test_ctx(&decode_ctx, ctx, request->proto_dict) < 0) {
+               if (tp_decode->test_ctx(&decode_ctx, ctx, request->proto_dict, NULL) < 0) {
                        return XLAT_ACTION_FAIL;
                }
        }
@@ -4189,7 +4189,7 @@ static xlat_action_t protocol_encode_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
         *      Create the encoding context.
         */
        if (tp_encode->test_ctx) {
-               if (tp_encode->test_ctx(&encode_ctx, cursor, request->proto_dict) < 0) {
+               if (tp_encode->test_ctx(&encode_ctx, cursor, request->proto_dict, NULL) < 0) {
                        return XLAT_ACTION_FAIL;
                }
        }
index ffbd1de143d196d7872d825f7472552e8dc57f8f..fb8d615b2d3ce920132915bf1fe4384b97ae0e74 100644 (file)
@@ -24,7 +24,8 @@ RCSID("$Id$")
 
 #include <freeradius-devel/io/test_point.h>
 
-static int decode_test_ctx(void **out, UNUSED TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int decode_test_ctx(void **out, UNUSED TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        *out = NULL;
        return 0;
index e117e926279ba26426a55d52e293b23a72a8e86f..e196931c71bf7711735c30599d18b6becd96abd6 100644 (file)
@@ -393,7 +393,8 @@ typedef struct {
        bool            tmp;
 } fr_arp_ctx_t;
 
-static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_arp_ctx_t *test_ctx;
 
index e2788a0ea0e406ca83e33f273b8480f5d6d64dd6..869c0953c554275994f1280f97aea874a7e08eae 100644 (file)
@@ -99,7 +99,8 @@ ssize_t fr_bfd_decode(TALLOC_CTX *ctx, fr_pair_list_t *out,
        return slen;
 }
 
-static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_bfd_ctx_t    *test_ctx;
 
index 232a68bda8f65fd8723d00117bc0c2cdbb8cf6ec..3c4a19a523e3ff8bd03d55b8b31091b9938b7397 100644 (file)
@@ -162,7 +162,8 @@ ssize_t fr_bfd_encode(uint8_t *out, size_t outlen, UNUSED uint8_t const *origina
 }
 
 
-static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_bfd_ctx_t    *test_ctx;
 
index 7d55f2306d21222eb23745720968769cf6c8294a..77c31d3de56e355ecc66b89d2fc04aa765939bd8 100644 (file)
@@ -70,7 +70,8 @@ fr_test_point_pair_decode_t cbor_tp_decode_pair = {
        .func           = decode_pair
 };
 
-static int decode_test_ctx(void **out, UNUSED TALLOC_CTX *ctx, fr_dict_t const *dict)
+static int decode_test_ctx(void **out, UNUSED TALLOC_CTX *ctx, fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        *out = UNCONST(fr_dict_t *, dict);
 
index c2b510659382298b3c1a8b9b17ff860fe48a877b..f8f5dcb70f4c78abc021cf5c6652bbf0d80c21ea 100644 (file)
@@ -2679,7 +2679,8 @@ static ssize_t decode_pair(TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dict_attr_t
 /*
  *     Test points
  */
-static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_der_decode_ctx_t *test_ctx;
 
index f7db2e46f103d252039f4409d9b0e9b4679d0ca2..0485ffef383b3354a96c0fdca55d89b116b55ba4 100644 (file)
@@ -1799,7 +1799,8 @@ static ssize_t fr_der_encode_proto(UNUSED TALLOC_CTX *ctx, fr_pair_list_t *vps,
 /*
  *     Test points
  */
-static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_der_encode_ctx_t *test_ctx;
 
index 9f798a0484cadc63100c17a927924ab1c02db083..876b09a666e3707680004da138a0474f78684ab3 100644 (file)
@@ -704,12 +704,14 @@ ssize_t   fr_dhcpv4_decode_foreign(TALLOC_CTX *ctx, fr_pair_list_t *out,
 }
 
 
-static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          fr_dict_attr_t const *root_da)
 {
        fr_dhcpv4_ctx_t *test_ctx;
 
        test_ctx = talloc_zero(ctx, fr_dhcpv4_ctx_t);
        test_ctx->tmp_ctx = talloc(test_ctx, uint8_t);
+       test_ctx->root = root_da;
 
        *out = test_ctx;
 
index 529b9bec99702e96ad0e185a2d87a4d54714faf0..05bf83aea5c8db5c1817b5bd0409ed72b2ffc602 100644 (file)
@@ -807,13 +807,14 @@ static ssize_t fr_dhcpv4_encode_proto(UNUSED TALLOC_CTX *ctx, fr_pair_list_t *vp
        return fr_dhcpv4_encode_dbuff(&FR_DBUFF_TMP(data, data_len), NULL, 0, 0, vps);
 }
 
-static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          fr_dict_attr_t const *root_da)
 {
        fr_dhcpv4_ctx_t *test_ctx;
 
        test_ctx = talloc_zero(ctx, fr_dhcpv4_ctx_t);
        if (!test_ctx) return -1;
-       test_ctx->root = fr_dict_root(dict_dhcpv4);
+       test_ctx->root = root_da ? root_da : fr_dict_root(dict_dhcpv4);
 
        *out = test_ctx;
 
index 962463de50624e182ab24d1b7ae5073c0f4707f7..73d7a40ef63ca8a2fbb54f2ce218445c77beb37c 100644 (file)
@@ -500,7 +500,8 @@ ssize_t     fr_dhcpv6_decode_foreign(TALLOC_CTX *ctx, fr_pair_list_t *out,
        return data_len;
 }
 
-static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_dhcpv6_decode_ctx_t  *test_ctx;
 
index f1b1cd6985aff6a2f6ddc468743f8db327ba5d01..07af95ba4992d316d381befe37286410d1199b43 100644 (file)
@@ -749,7 +749,8 @@ ssize_t     fr_dhcpv6_encode_foreign(fr_dbuff_t *dbuff, fr_pair_list_t const *list)
 }
 
 
-static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_dhcpv6_encode_ctx_t  *test_ctx;
 
index d237a297b9036bf56777e165200f58bea9ba0112..3ad88d6f595caac176e5d8f76c83cf24a3cb2e45 100644 (file)
@@ -372,7 +372,8 @@ static ssize_t decode_rr(TALLOC_CTX *ctx, fr_pair_list_t *out, UNUSED fr_dict_at
 /*
  *     Test points
  */
-static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_dns_ctx_t *test_ctx;
 
index 18d7f6a4cada02facdacb2a7d1ba2e877c3bd408..1f7fc5f43975c210936fd82245729bb23c131a6e 100644 (file)
@@ -509,7 +509,8 @@ ssize_t fr_dns_encode(fr_dbuff_t *dbuff, fr_pair_list_t *vps, fr_dns_ctx_t *pack
        return fr_dbuff_set(dbuff, &work_dbuff);
 }
 
-static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_dns_ctx_t    *test_ctx;
 
index babe538d1bb8d6caae6b02449fc94f916c962dc8..ccdebc98bcb33bd4e52fbed7167d6a2999e868e9 100644 (file)
@@ -2142,7 +2142,8 @@ static int _test_ctx_free(fr_radius_decode_ctx_t *ctx)
        return 0;
 }
 
-static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        static uint8_t vector[RADIUS_AUTH_VECTOR_LENGTH] = {
                0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
index 867e4b9f31da734d906127e240bea5d2bcb38342..e280e8186586c76e19ee051cb07b37dc2ec70cf8 100644 (file)
@@ -1707,7 +1707,8 @@ ssize_t   fr_radius_encode_foreign(fr_dbuff_t *dbuff, fr_pair_list_t const *list)
 }
 
 
-static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        static uint8_t vector[RADIUS_AUTH_VECTOR_LENGTH] = {
                0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
index ad7d42c97101c6e922b5fe9ce18b9715bb870742..2b9c3eb6f44fdbe481a1645628907c77fcec29bd 100644 (file)
@@ -1088,7 +1088,8 @@ static int _encode_test_ctx(fr_tacacs_ctx_t *proto_ctx)
        return 0;
 }
 
-static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_tacacs_ctx_t *test_ctx;
 
index b601b19bd593f201a1ce7d12418b33b0b8541174..fa4d3b194e246773a8e225a6afb35044ab213f20 100644 (file)
@@ -1057,7 +1057,8 @@ static int _encode_test_ctx(fr_tacacs_ctx_t *proto_ctx)
        return 0;
 }
 
-static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_tacacs_ctx_t *test_ctx;
 
index 23a8e9734a3cae9418e16f02985468f4f7798612..693a9fdc174b57014a92543c92a75603771d3fe3 100644 (file)
@@ -292,7 +292,8 @@ static int _decode_test_ctx(UNUSED fr_tftp_ctx_t *proto_ctx)
        return 0;
 }
 
-static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_tftp_ctx_t *test_ctx;
 
index 6cdc22349d6491dce0067c45d26fa6dc6c0d4f2e..448661d57e960236cf1f30f3013f40438db32a88 100644 (file)
@@ -254,7 +254,8 @@ static int _encode_test_ctx(UNUSED fr_tftp_ctx_t *proto_ctx)
        return 0;
 }
 
-static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_tftp_ctx_t *test_ctx;
 
index 137ce952f0a67ac2cf61160d71d7106d8604d396..9ca073ffef31f13de986c2f6728d7407c9c6b323 100644 (file)
@@ -521,7 +521,8 @@ static int _decode_test_ctx(UNUSED fr_vmps_ctx_t *proto_ctx)
        return 0;
 }
 
-static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int decode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_vmps_ctx_t *test_ctx;
 
@@ -562,7 +563,8 @@ static int _encode_test_ctx(UNUSED fr_vmps_ctx_t *proto_ctx)
        return 0;
 }
 
-static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict)
+static int encode_test_ctx(void **out, TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict,
+                          UNUSED fr_dict_attr_t const *root_da)
 {
        fr_vmps_ctx_t *test_ctx;