]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
nothing uses VT_XLAT any more
authorAlan T. DeKok <aland@freeradius.org>
Fri, 10 Dec 2021 23:42:44 +0000 (18:42 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 10 Dec 2021 23:42:44 +0000 (18:42 -0500)
src/bin/dhcpclient.c
src/bin/radclient.c
src/bin/unit_test_module.c
src/lib/util/pair.c
src/lib/util/pair.h
src/lib/util/pair_print.c

index 1e6e8cf52de3d18a7c77561b989c01e842f024b1..516a4b57d09fb7814e210ec20355bf21df5f8d1d 100644 (file)
@@ -181,8 +181,6 @@ static int request_init(fr_radius_packet_t **out, fr_pair_list_t *packet_vps, ch
        for (vp = fr_pair_list_head(packet_vps);
             vp;
             vp = fr_pair_list_next(packet_vps, vp)) {
-               fr_assert(vp->type != VT_XLAT);
-
                /*
                 *      Allow to set packet type using Message-Type
                 */
index dade6025de009d6c3bf9fd94363b200e3670856a..7b7bd9ad904e3125484931237039db21eb86fdf0 100644 (file)
@@ -453,8 +453,6 @@ static int radclient_init(TALLOC_CTX *ctx, rc_file_pair_t *files)
                             vp;
                             vp = fr_pair_list_next(&request->filter, vp)) {
                             again:
-                               fr_assert(vp->type != VT_XLAT);
-
                                if (vp->da == attr_packet_type) {
                                        fr_pair_t *next;
                                        next = fr_pair_list_next(&request->filter, vp); /* so we don't break the filter */
@@ -478,8 +476,6 @@ static int radclient_init(TALLOC_CTX *ctx, rc_file_pair_t *files)
                for (vp = fr_pair_list_head(&request->request_pairs);
                     vp;
                     vp = fr_pair_list_next(&request->request_pairs, vp)) {
-                       fr_assert(vp->type != VT_XLAT);
-
                        /*
                         *      Allow it to set the packet type in
                         *      the attributes read from the file.
index a63318a5e425ba8cb3d613e362ca9073fad94492..ce9433c3ce676d87efa5866e22b681e0699c849c 100644 (file)
@@ -226,8 +226,6 @@ static request_t *request_from_file(TALLOC_CTX *ctx, FILE *fp, RADCLIENT *client
        for (vp = fr_pair_dcursor_init(&cursor, &request->request_pairs);
             vp;
             vp = fr_dcursor_next(&cursor)) {
-               fr_assert(vp->type != VT_XLAT);
-
                if (vp->da == attr_packet_type) {
                        request->packet->code = vp->vp_uint32;
                } else if (vp->da == attr_packet_dst_port) {
index e084a41edbec5400cbef97b36044dc5153c4fa2f..19f88aba993928988aee4fabcbb118f79ca825bc 100644 (file)
@@ -419,16 +419,6 @@ fr_pair_t *fr_pair_copy(TALLOC_CTX *ctx, fr_pair_t const *vp)
        }
 
 
-       /*
-        *      If it's an xlat, copy the raw string and return
-        *      early, so we don't pre-expand or otherwise mangle
-        *      the fr_pair_t.
-        */
-       if (vp->type == VT_XLAT) {
-               n->xlat = talloc_typed_strdup(n, vp->xlat);
-               return n;
-       }
-
        /*
         *      Groups are special.
         */
index 037aedd3290f7bcca0fbb1397dc3bf8f0ee6ff37..f2894ab85d98871c184d0d73638e1c0d1c33ff56 100644 (file)
@@ -55,8 +55,6 @@ typedef enum value_type {
        VT_SET,                                                 //!< fr_pair_t has children.
        VT_LIST,                                                //!< fr_pair_t has multiple values.
        VT_DATA,                                                //!< fr_pair_t has a single value.
-       VT_XLAT                                                 //!< valuepair value must be xlat expanded when it's
-                                                               //!< added to fr_pair_t tree.
 } value_type_t;
 
 typedef struct value_pair_s fr_pair_t;
index 1b7bb5cb3f4f6c643936de2f6f029a6a489bdeaf..5e2ddc9271280b4b5979b4af8dbe12f90f2b1a3a 100644 (file)
@@ -43,15 +43,6 @@ ssize_t fr_pair_print_value_quoted(fr_sbuff_t *out, fr_pair_t const *vp, fr_toke
 
        PAIR_VERIFY(vp);
 
-       /*
-        *      Legacy crap that needs to be removed
-        */
-       if (vp->type == VT_XLAT) {
-               char const *quote_str = fr_table_str_by_value(fr_token_quotes_table, quote, "");
-
-               return fr_sbuff_in_sprintf(out, "%s%s%s", quote_str, vp->xlat, quote_str);
-       }
-
        switch (vp->da->type) {
        /*
         *      For structural types descend down