]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Better names for some tmpl functions
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 6 Jan 2021 16:56:29 +0000 (16:56 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 6 Jan 2021 16:56:29 +0000 (16:56 +0000)
12 files changed:
src/bin/radclient.h
src/lib/server/map.c
src/lib/server/map_async.c
src/lib/server/tmpl.h
src/lib/server/tmpl_eval.c
src/lib/server/tmpl_tokenize.c
src/lib/unlang/xlat_eval.c
src/modules/rlm_exec/rlm_exec.c
src/modules/rlm_ldap/groups.c
src/modules/rlm_mruby/rlm_mruby.c
src/modules/rlm_python/rlm_python.c
src/modules/rlm_rest/rest.c

index a623600d532d4d7b1003535e00d1949c3653a6fe..65785a5069def27308b408b5aadb0b683cc6670f 100644 (file)
@@ -51,42 +51,46 @@ extern "C" {
 #define RDEBUG2(fmt, ...)      if (do_output && (fr_debug_lvl > 1)) fprintf(fr_log_fp, "(%" PRIu64 ") " fmt "\n", request->num, ## __VA_ARGS__)
 
 typedef struct {
-       uint64_t accepted;              //!< Requests to which we received a accept
-       uint64_t rejected;              //!< Requests to which we received a reject
-       uint64_t lost;                  //!< Requests to which we received no response
-       uint64_t passed;                //!< Requests which passed a filter
-       uint64_t failed;                //!< Requests which failed a fitler
+       uint64_t accepted;                      //!< Requests to which we received a accept
+       uint64_t rejected;                      //!< Requests to which we received a reject
+       uint64_t lost;                          //!< Requests to which we received no response
+       uint64_t passed;                        //!< Requests which passed a filter
+       uint64_t failed;                        //!< Requests which failed a fitler
 } rc_stats_t;
 
 typedef struct {
-       char const *packets;            //!< The file containing the request packet
-       char const *filters;            //!< The file containing the definition of the
-                                       //!< packet we want to match.
+       char const *packets;                    //!< The file containing the request packet
+       char const *filters;                    //!< The file containing the definition of the
+                                               //!< packet we want to match.
 } rc_file_pair_t;
 
 typedef struct rc_request rc_request_t;
 
 struct rc_request {
-       uint64_t        num;            //!< The number (within the file) of the request were reading.
+       uint64_t                num;            //!< The number (within the file) of the request were reading.
 
-       rc_request_t    *prev;
-       rc_request_t    *next;
+       rc_request_t            *prev;
+       rc_request_t            *next;
 
-       rc_file_pair_t  *files;         //!< Request and response file names.
+       rc_file_pair_t          *files;         //!< Request and response file names.
 
-       fr_pair_t       *password;      //!< Password.Cleartext
-       fr_time_delta_t timestamp;
+       fr_pair_t               *password;      //!< Password.Cleartext
+       fr_time_delta_t         timestamp;
 
        fr_radius_packet_t      *packet;        //!< The outgoing request.
        fr_radius_packet_t      *reply;         //!< The incoming response.
-       fr_pair_list_t  filter;         //!< If the reply passes the filter, then the request passes.
-       FR_CODE         filter_code;    //!< Expected code of the response packet.
 
-       int             resend;
-       int             tries;
-       bool            done;           //!< Whether the request is complete.
+       fr_pair_list_t          *request_list;
+       fr_pair_list_t          *reply_list;
 
-       char const      *name;          //!< Test name (as specified in the request).
+       fr_pair_list_t          filter;         //!< If the reply passes the filter, then the request passes.
+       FR_CODE                 filter_code;    //!< Expected code of the response packet.
+
+       int                     resend;
+       int                     tries;
+       bool                    done;           //!< Whether the request is complete.
+
+       char const              *name;          //!< Test name (as specified in the request).
 };
 
 #ifdef __cplusplus
index ef87d1306ceb90ed8ba9dd2afeedee9ac6d97101..4b3a2ccaf1684fd80da1148ca44a3ec3b31e5738 100644 (file)
@@ -490,7 +490,7 @@ int map_afrom_cs(TALLOC_CTX *ctx, map_t **out, CONF_SECTION *cs,
         */
        cs_list = p = cf_section_name2(cs);
        if (cs_list && (strcmp(cf_section_name1(cs), "update") == 0)) {
-               p += radius_request_name(&our_lhs_rules.request_def, p, REQUEST_CURRENT);
+               p += tmpl_request_ref_by_name(&our_lhs_rules.request_def, p, REQUEST_CURRENT);
                if (our_lhs_rules.request_def == REQUEST_UNKNOWN) {
                        cf_log_err(ci, "Default request specified in mapping section is invalid");
                        return -1;
@@ -898,7 +898,7 @@ static int map_exec_to_vp(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *reque
        /*
         *      We always put the request pairs into the environment
         */
-       input_pairs = tmpl_request_pair_list(request, PAIR_LIST_REQUEST);
+       input_pairs = tmpl_list_head(request, PAIR_LIST_REQUEST);
 
        /*
         *      Automagically switch output type depending on our destination
@@ -996,8 +996,8 @@ int map_to_vp(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *request, map_t co
        if (tmpl_is_list(map->lhs) && tmpl_is_list(map->rhs)) {
                fr_pair_list_t *from = NULL;
 
-               if (radius_request(&context, tmpl_request(map->rhs)) == 0) {
-                       from = tmpl_request_pair_list(context, tmpl_list(map->rhs));
+               if (tmpl_request_ptr(&context, tmpl_request(map->rhs)) == 0) {
+                       from = tmpl_list_head(context, tmpl_list(map->rhs));
                }
                if (!from) return 0;
 
@@ -1310,7 +1310,7 @@ int map_to_request(request_t *request, map_t const *map, radius_map_getvalue_t f
 
        context = request;
        request_ref = tmpl_request(map->lhs);
-       if (radius_request(&context, request_ref) < 0) {
+       if (tmpl_request_ptr(&context, request_ref) < 0) {
                REDEBUG("Mapping \"%.*s\" -> \"%.*s\" cannot be performed due to invalid request reference \"%s\" in right side of map",
                        (int)map->rhs->len, map->rhs->name, (int)map->lhs->len, map->lhs->name,
                        fr_table_str_by_value(tmpl_request_ref_table, request_ref, "<INVALID>"));
@@ -1319,7 +1319,7 @@ int map_to_request(request_t *request, map_t const *map, radius_map_getvalue_t f
        }
 
        list_ref = tmpl_list(map->lhs);
-       list = tmpl_request_pair_list(context, list_ref);
+       list = tmpl_list_head(context, list_ref);
        if (!list) {
                REDEBUG("Mapping \"%.*s\" -> \"%.*s\" cannot be performed due to to invalid list qualifier \"%s\" in left side of map",
                        (int)map->rhs->len, map->rhs->name, (int)map->lhs->len, map->lhs->name,
@@ -1328,7 +1328,7 @@ int map_to_request(request_t *request, map_t const *map, radius_map_getvalue_t f
                goto finish;
        }
 
-       parent = tmpl_request_pair_list_ctx(context, tmpl_list(map->lhs));
+       parent = tmpl_list_ctx(context, tmpl_list(map->lhs));
        fr_assert(parent);
 
        /*
index b50c8b84f668c69958ab0a9611b7a90ce36a16a0..3ec6f7b86341296abfe18a4a437b0cc28ca68c71 100644 (file)
@@ -203,7 +203,7 @@ static inline fr_pair_list_t *map_check_src_or_dst(request_t *request, map_t con
        tmpl_pair_list_t        list_ref;
 
        request_ref = tmpl_request(src_dst);
-       if (radius_request(&context, request_ref) < 0) {
+       if (tmpl_request_ptr(&context, request_ref) < 0) {
                REDEBUG("Mapping \"%.*s\" -> \"%.*s\" cannot be performed due to invalid request reference \"%s\"",
                        (int)map->rhs->len, map->rhs->name, (int)map->lhs->len, map->lhs->name,
                        fr_table_str_by_value(tmpl_request_ref_table, request_ref, "<INVALID>"));
@@ -211,7 +211,7 @@ static inline fr_pair_list_t *map_check_src_or_dst(request_t *request, map_t con
        }
 
        list_ref = tmpl_list(src_dst);
-       list = tmpl_request_pair_list(context, list_ref);
+       list = tmpl_list_head(context, list_ref);
        if (!list) {
                REDEBUG("Mapping \"%.*s\" -> \"%.*s\" cannot be performed due to to invalid list qualifier \"%s\"",
                        (int)map->rhs->len, map->rhs->name, (int)map->lhs->len, map->lhs->name,
@@ -980,12 +980,12 @@ int map_list_mod_apply(request_t *request, vp_list_mod_t const *vlm)
         *      All this has been checked by #map_to_list_mod
         */
        context = request;
-       if (!fr_cond_assert(mod && radius_request(&context, tmpl_request(mod->lhs)) == 0)) return -1;
+       if (!fr_cond_assert(mod && tmpl_request_ptr(&context, tmpl_request(mod->lhs)) == 0)) return -1;
 
-       vp_list = tmpl_request_pair_list(context, tmpl_list(mod->lhs));
+       vp_list = tmpl_list_head(context, tmpl_list(mod->lhs));
        if (!fr_cond_assert(vp_list)) return -1;
 
-       parent = tmpl_request_pair_list_ctx(context, tmpl_list(mod->lhs));
+       parent = tmpl_list_ctx(context, tmpl_list(mod->lhs));
        fr_assert(parent);
 
        /*
index 840ea6715fcd5167761c13704f5cd2d263bf37d5..c79b381bda1e4216b813de572273ab97d4e840a8 100644 (file)
@@ -769,9 +769,9 @@ void tmpl_verify(char const *file, int line, tmpl_t const *vpt);
 #define tmpl_pair_list_AND_CTX(_ctx, _head, _request, _ref, _list) \
 do {\
        request_t *_rctx = _request; \
-       if ((radius_request(&_rctx, _ref) < 0) || \
-           !(_head = tmpl_request_pair_list(_rctx, _list)) || \
-           !(_ctx = tmpl_request_pair_list_ctx(_rctx, _list))) {\
+       if ((tmpl_request_ptr(&_rctx, _ref) < 0) || \
+           !(_head = tmpl_list_head(_rctx, _list)) || \
+           !(_ctx = tmpl_list_ctx(_rctx, _list))) {\
                _ctx = NULL; \
                _head = NULL; \
        }\
@@ -846,17 +846,17 @@ typedef enum {
 
 void                   tmpl_debug(tmpl_t const *vpt);
 
-fr_pair_list_t         *tmpl_request_pair_list(request_t *request, tmpl_pair_list_t list);
+fr_pair_list_t         *tmpl_list_head(request_t *request, tmpl_pair_list_t list);
 
-fr_radius_packet_t     *tmpl_request_packet(request_t *request, tmpl_pair_list_t list_name);
+fr_radius_packet_t     *tmpl_packet_ptr(request_t *request, tmpl_pair_list_t list_name);
 
-TALLOC_CTX             *tmpl_request_pair_list_ctx(request_t *request, tmpl_pair_list_t list_name);
+TALLOC_CTX             *tmpl_list_ctx(request_t *request, tmpl_pair_list_t list_name);
 
 size_t                 tmpl_pair_list_name(tmpl_pair_list_t *out, char const *name, tmpl_pair_list_t default_list);
 
-int                    radius_request(request_t **request, tmpl_request_ref_t name);
+int                    tmpl_request_ptr(request_t **request, tmpl_request_ref_t name);
 
-size_t                 radius_request_name(tmpl_request_ref_t *out, char const *name, tmpl_request_ref_t unknown);
+size_t                 tmpl_request_ref_by_name(tmpl_request_ref_t *out, char const *name, tmpl_request_ref_t unknown);
 
 tmpl_t                 *tmpl_init_printf(tmpl_t *vpt, tmpl_type_t type, fr_token_t quote, char const *fmt, ...);
 
index 74005d551fd913c8d6e0907c21825d8a60a7e1fb..802901912e0cc5d12f2491d952b379addbba47da 100644 (file)
@@ -45,7 +45,7 @@ RCSID("$Id$")
  *
  * @see tmpl_cursor_init
  */
-fr_pair_list_t *tmpl_request_pair_list(request_t *request, tmpl_pair_list_t list)
+fr_pair_list_t *tmpl_list_head(request_t *request, tmpl_pair_list_t list)
 {
        if (!request) return NULL;
 
@@ -90,7 +90,7 @@ fr_pair_list_t *tmpl_request_pair_list(request_t *request, tmpl_pair_list_t list
  *
  * @see tmpl_pair_list
  */
-TALLOC_CTX *tmpl_request_pair_list_ctx(request_t *request, tmpl_pair_list_t list)
+TALLOC_CTX *tmpl_list_ctx(request_t *request, tmpl_pair_list_t list)
 {
        if (!request) return NULL;
 
@@ -128,7 +128,7 @@ TALLOC_CTX *tmpl_request_pair_list_ctx(request_t *request, tmpl_pair_list_t list
  *
  * @see tmpl_pair_list
  */
-fr_radius_packet_t *tmpl_request_packet(request_t *request, tmpl_pair_list_t list)
+fr_radius_packet_t *tmpl_packet_ptr(request_t *request, tmpl_pair_list_t list)
 {
        switch (list) {
        /* Don't add default */
@@ -161,7 +161,7 @@ fr_radius_packet_t *tmpl_request_packet(request_t *request, tmpl_pair_list_t lis
  *     - 0 if request is valid in this context.
  *     - -1 if request is not valid in this context.
  */
-int radius_request(request_t **context, tmpl_request_ref_t name)
+int tmpl_request_ptr(request_t **context, tmpl_request_ref_t name)
 {
        request_t *request = *context;
 
@@ -1213,7 +1213,7 @@ fr_pair_t *tmpl_cursor_init(int *err, TALLOC_CTX *ctx, tmpl_cursor_ctx_t *cc,
         *      Navigate to the correct request context
         */
        while ((rr = fr_dlist_next(&vpt->data.attribute.rr, rr))) {
-               if (radius_request(&request, rr->request) < 0) {
+               if (tmpl_request_ptr(&request, rr->request) < 0) {
                        if (err) {
                                *err = -3;
                                fr_strerror_printf("Request context \"%s\" not available",
@@ -1228,7 +1228,7 @@ fr_pair_t *tmpl_cursor_init(int *err, TALLOC_CTX *ctx, tmpl_cursor_ctx_t *cc,
        /*
         *      Get the right list in the specified context
         */
-       list_head = tmpl_request_pair_list(request, tmpl_list(vpt));
+       list_head = tmpl_list_head(request, tmpl_list(vpt));
        if (!list_head) {
                if (err) {
                        *err = -2;
@@ -1237,7 +1237,7 @@ fr_pair_t *tmpl_cursor_init(int *err, TALLOC_CTX *ctx, tmpl_cursor_ctx_t *cc,
                }
                goto error;
        }
-       list_ctx = tmpl_request_pair_list_ctx(request, tmpl_list(vpt));
+       list_ctx = tmpl_list_ctx(request, tmpl_list(vpt));
 
        /*
         *      Initialise the temporary cursor context
@@ -1547,7 +1547,7 @@ int tmpl_extents_find(TALLOC_CTX *ctx,
         *      Navigate to the correct request context
         */
        while ((rr = fr_dlist_next(&vpt->data.attribute.rr, rr))) {
-               if (radius_request(&request, rr->request) < 0) {
+               if (tmpl_request_ptr(&request, rr->request) < 0) {
                        fr_strerror_printf("Request context \"%s\" not available",
                                           fr_table_str_by_value(tmpl_request_ref_table, rr->request, "<INVALID>"));
                        return -3;
@@ -1557,13 +1557,13 @@ int tmpl_extents_find(TALLOC_CTX *ctx,
        /*
         *      Get the right list in the specified context
         */
-       list_head = tmpl_request_pair_list(request, tmpl_list(vpt));
+       list_head = tmpl_list_head(request, tmpl_list(vpt));
        if (!list_head) {
                fr_strerror_printf("List \"%s\" not available in this context",
                                   fr_table_str_by_value(pair_list_table, tmpl_list(vpt), "<INVALID>"));
                return -2;
        }
-       list_ctx = tmpl_request_pair_list_ctx(request, tmpl_list(vpt));
+       list_ctx = tmpl_list_ctx(request, tmpl_list(vpt));
 
        /*
         *      If it's a list, just return the list head
index 94eada6482a4393c9e7080592fca19119086f775..d71bdf1d27de6287abb03d7f4f0f393c18187564 100644 (file)
@@ -290,7 +290,7 @@ void tmpl_debug(tmpl_t const *vpt)
  * These functions also resolve #pair_list_t and #tmpl_request_ref_t values to #request_t
  * structs and the head of #fr_pair_t lists in those structs.
  *
- * For adding new #fr_pair_t to the lists, the #tmpl_request_pair_list_ctx function can be used
+ * For adding new #fr_pair_t to the lists, the #tmpl_list_ctx function can be used
  * to obtain the appropriate TALLOC_CTX pointer.
  *
  * @note These don't really have much to do with #tmpl_t. They're in the same
@@ -402,7 +402,7 @@ size_t tmpl_pair_list_name(tmpl_pair_list_t *out, char const *name, tmpl_pair_li
  * @see tmpl_pair_list_name
  * @see tmpl_request_ref_table
  */
-size_t radius_request_name(tmpl_request_ref_t *out, char const *name, tmpl_request_ref_t def)
+size_t tmpl_request_ref_by_name(tmpl_request_ref_t *out, char const *name, tmpl_request_ref_t def)
 {
        char const *p, *q;
 
index 468d904baa36edc0b55c143c6219189642a43210..89d20a60f2aac6a49eedd48b7733080463b72df9 100644 (file)
@@ -464,7 +464,7 @@ static xlat_action_t xlat_eval_pair_virtual(TALLOC_CTX *ctx, fr_cursor_t *out, r
         *      If there's no packet, we can't print any attribute
         *      referencing it.
         */
-       packet = tmpl_request_packet(request, tmpl_list(vpt));
+       packet = tmpl_packet_ptr(request, tmpl_list(vpt));
        if (!packet) return XLAT_ACTION_DONE;
 
        if (tmpl_da(vpt) == attr_packet_type) {
index 8fe4d5a0e8297c86892eb688963c799f46d5561b..aa4b06eeda8f5bbdeb0e975b46b925ade59c31ed 100644 (file)
@@ -113,7 +113,7 @@ static ssize_t exec_xlat(UNUSED TALLOC_CTX *ctx, char **out, size_t outlen,
        }
 
        if (inst->input_list) {
-               input_pairs = tmpl_request_pair_list(request, inst->input_list);
+               input_pairs = tmpl_list_head(request, inst->input_list);
                if (!input_pairs) {
                        REDEBUG("Failed to find input pairs for xlat");
                        return -1;
@@ -270,7 +270,7 @@ static unlang_action_t mod_exec_nowait_resume(rlm_rcode_t *p_result, module_ctx_
        if (inst->input) {
                fr_pair_list_t *input_pairs;
 
-               input_pairs = tmpl_request_pair_list(request, inst->input_list);
+               input_pairs = tmpl_list_head(request, inst->input_list);
                if (!input_pairs) {
                        RETURN_MODULE_INVALID;
                }
@@ -362,10 +362,10 @@ static unlang_action_t mod_exec_wait_resume(rlm_rcode_t *p_result, module_ctx_t
 
                RDEBUG("EXEC GOT -- %pV", m->box);
 
-               output_pairs = tmpl_request_pair_list(request, inst->output_list);
+               output_pairs = tmpl_list_head(request, inst->output_list);
                fr_assert(output_pairs != NULL);
 
-               ctx = tmpl_request_pair_list_ctx(request, inst->output_list);
+               ctx = tmpl_list_ctx(request, inst->output_list);
 
                vps = fr_pair_list_afrom_box(ctx, request->dict, m->box);
                if (vps) fr_pair_list_move(output_pairs, &vps);
@@ -425,14 +425,14 @@ static unlang_action_t CC_HINT(nonnull) mod_exec_dispatch(rlm_rcode_t *p_result,
        if (inst->input) {
                fr_pair_list_t *input_pairs;
 
-               input_pairs = tmpl_request_pair_list(request, inst->input_list);
+               input_pairs = tmpl_list_head(request, inst->input_list);
                if (!input_pairs) RETURN_MODULE_INVALID;
 
                env_pairs = *input_pairs;
        }
 
        if (inst->output) {
-               if (!tmpl_request_pair_list(request, inst->output_list)) {
+               if (!tmpl_list_head(request, inst->output_list)) {
                        RETURN_MODULE_INVALID;
                }
        }
index 3c24165dd29a5ec429a2747c3fb14c66327742f2..bd011d9c04af6fc2420a1414a208789301bedbbf 100644 (file)
@@ -310,8 +310,8 @@ unlang_action_t rlm_ldap_cacheable_userobj(rlm_rcode_t *p_result, rlm_ldap_t con
        }
        count = ldap_count_values_len(values);
 
-       list = tmpl_request_pair_list(request, PAIR_LIST_CONTROL);
-       list_ctx = tmpl_request_pair_list_ctx(request, PAIR_LIST_CONTROL);
+       list = tmpl_list_head(request, PAIR_LIST_CONTROL);
+       list_ctx = tmpl_list_ctx(request, PAIR_LIST_CONTROL);
        fr_assert(list != NULL);
        fr_assert(list_ctx != NULL);
 
index 9f77583d8c614278ac65b7a38ab98b2c72a90f33..322b4dd7495d037c8f91181787c91fa3bde69e20 100644 (file)
@@ -363,7 +363,7 @@ static void add_vp_tuple(TALLOC_CTX *ctx, request_t *request, fr_pair_list_t *vp
                        continue;
                }
 
-               if (radius_request(&request, tmpl_request(dst)) < 0) {
+               if (tmpl_request_ptr(&request, tmpl_request(dst)) < 0) {
                        ERROR("Attribute name %s refers to outer request but not in a tunnel, skipping...", ckey);
                        talloc_free(dst);
                        continue;
index 32ffcf6c419b10d11662a25cfb2d9aaa0c5ecf39..4ae82a43809e2c919c4e339d28ae4fe417aff0b1 100644 (file)
@@ -331,7 +331,7 @@ static void mod_vptuple(TALLOC_CTX *ctx, rlm_python_t const *inst, request_t *re
                        continue;
                }
 
-               if (radius_request(&current, tmpl_request(dst)) < 0) {
+               if (tmpl_request_ptr(&current, tmpl_request(dst)) < 0) {
                        ERROR("%s - Attribute name %s.%s refers to outer request but not in a tunnel, skipping...",
                              funcname, list_name, s1);
                        talloc_free(dst);
index dbf57581f6787517eeab888f37ba0cda81fd4099..e184eb442b59dd17ffa2aa482a11fcefecaf0cda 100644 (file)
@@ -751,19 +751,19 @@ static int rest_decode_post(UNUSED rlm_rest_t const *instance, UNUSED rlm_rest_s
                        goto skip;
                }
 
-               if (radius_request(&current, tmpl_request(dst)) < 0) {
+               if (tmpl_request_ptr(&current, tmpl_request(dst)) < 0) {
                        RWDEBUG("Attribute name refers to outer request but not in a tunnel (skipping)");
                        talloc_free(dst);
                        goto skip;
                }
 
-               vps = tmpl_request_pair_list(current, tmpl_list(dst));
+               vps = tmpl_list_head(current, tmpl_list(dst));
                if (!vps) {
                        RWDEBUG("List not valid in this context (skipping)");
                        talloc_free(dst);
                        goto skip;
                }
-               ctx = tmpl_request_pair_list_ctx(current, tmpl_list(dst));
+               ctx = tmpl_list_ctx(current, tmpl_list(dst));
                da = tmpl_da(dst);
 
                fr_assert(vps);
@@ -1038,17 +1038,17 @@ static int json_pair_alloc(rlm_rest_t const *instance, rlm_rest_section_t const
                        continue;
                }
 
-               if (radius_request(&current, tmpl_request(dst)) < 0) {
+               if (tmpl_request_ptr(&current, tmpl_request(dst)) < 0) {
                        RWDEBUG("Attribute name refers to outer request but not in a tunnel (skipping)");
                        continue;
                }
 
-               vps = tmpl_request_pair_list(current, tmpl_list(dst));
+               vps = tmpl_list_head(current, tmpl_list(dst));
                if (!vps) {
                        RWDEBUG("List not valid in this context (skipping)");
                        continue;
                }
-               ctx = tmpl_request_pair_list_ctx(current, tmpl_list(dst));
+               ctx = tmpl_list_ctx(current, tmpl_list(dst));
 
                /*
                 *  Alternative JSON structure which allows operator,