From: Alan T. DeKok Date: Fri, 10 Dec 2021 23:42:44 +0000 (-0500) Subject: nothing uses VT_XLAT any more X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afd03f9e33bbd562d52c828bfec3ef5ea8e8edd8;p=thirdparty%2Ffreeradius-server.git nothing uses VT_XLAT any more --- diff --git a/src/bin/dhcpclient.c b/src/bin/dhcpclient.c index 1e6e8cf52d..516a4b57d0 100644 --- a/src/bin/dhcpclient.c +++ b/src/bin/dhcpclient.c @@ -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 */ diff --git a/src/bin/radclient.c b/src/bin/radclient.c index dade6025de..7b7bd9ad90 100644 --- a/src/bin/radclient.c +++ b/src/bin/radclient.c @@ -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. diff --git a/src/bin/unit_test_module.c b/src/bin/unit_test_module.c index a63318a5e4..ce9433c3ce 100644 --- a/src/bin/unit_test_module.c +++ b/src/bin/unit_test_module.c @@ -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) { diff --git a/src/lib/util/pair.c b/src/lib/util/pair.c index e084a41edb..19f88aba99 100644 --- a/src/lib/util/pair.c +++ b/src/lib/util/pair.c @@ -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. */ diff --git a/src/lib/util/pair.h b/src/lib/util/pair.h index 037aedd329..f2894ab85d 100644 --- a/src/lib/util/pair.h +++ b/src/lib/util/pair.h @@ -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; diff --git a/src/lib/util/pair_print.c b/src/lib/util/pair_print.c index 1b7bb5cb3f..5e2ddc9271 100644 --- a/src/lib/util/pair_print.c +++ b/src/lib/util/pair_print.c @@ -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