in preparation for simply removing it entirely.
for (vp = fr_pair_list_head(packet_vps);
vp;
vp = fr_pair_list_next(packet_vps, vp)) {
-
- /*
- * Xlat expansions are not supported. Convert xlat to value box (if possible).
- */
- if (vp->type == VT_XLAT) {
- if (fr_value_box_from_str(vp, &vp->data,
- vp->da->type, NULL,
- vp->xlat, strlen(vp->xlat),
- NULL, false) < 0) {
- fr_perror("dhcpclient");
- fr_radius_packet_free(&packet);
- if (fp && (fp != stdin)) fclose(fp);
- return -1;
- }
- vp->type = VT_DATA;
- }
+ fr_assert(vp->type != VT_XLAT);
/*
* Allow to set packet type using Message-Type
vp;
vp = fr_pair_list_next(&request->filter, vp)) {
again:
- /*
- * Xlat expansions are not supported. Convert xlat to value box (if possible).
- */
- if (vp->type == VT_XLAT) {
- if (fr_value_box_from_str(vp, &vp->data,
- vp->da->type, NULL,
- vp->xlat, strlen(vp->xlat),
- NULL, false) < 0) {
- fr_perror("radclient");
- goto error;
- }
- vp->type = VT_DATA;
- }
+ fr_assert(vp->type != VT_XLAT);
if (vp->da == attr_packet_type) {
fr_pair_t *next;
for (vp = fr_pair_list_head(&request->request_pairs);
vp;
vp = fr_pair_list_next(&request->request_pairs, vp)) {
- /*
- * Xlat expansions are not supported. Convert xlat to value box (if possible).
- */
- if (vp->type == VT_XLAT) {
- if (fr_value_box_from_str(vp, &vp->data, vp->da->type, NULL,
- vp->xlat, strlen(vp->xlat),
- NULL, false) < 0) {
- fr_perror("radclient");
- goto error;
- }
- vp->type = VT_DATA;
- }
+ fr_assert(vp->type != VT_XLAT);
/*
* Allow it to set the packet type in
static int rs_build_filter(fr_pair_list_t *out, char const *filter)
{
- fr_pair_t *vp;
fr_token_t code;
code = fr_pair_list_afrom_str(conf, dict_radius, filter, strlen(filter), out);
return -1;
}
- for (vp = fr_pair_list_head(out);
- vp;
- vp = fr_pair_list_next(out, vp)) {
- /*
- * Xlat expansions are not supported. Convert xlat to value box (if possible).
- */
- if (vp->type == VT_XLAT) {
- if (fr_value_box_from_str(vp, &vp->data, vp->da->type, NULL,
- vp->xlat, strlen(vp->xlat),
- NULL, false) < 0) {
- fr_perror("radsniff");
- return -1;
- }
- vp->type = VT_DATA;
- }
- }
-
/*
* This allows efficient list comparisons later
*/
for (vp = fr_pair_dcursor_init(&cursor, &request->request_pairs);
vp;
vp = fr_dcursor_next(&cursor)) {
- /*
- * Double quoted strings get marked up as xlat expansions,
- * but we don't support that here.
- */
- if (vp->type == VT_XLAT) {
- fr_pair_value_bstrdup_buffer_shallow(vp, vp->xlat, false);
- vp->xlat = NULL;
- vp->type = VT_DATA;
- }
+ fr_assert(vp->type != VT_XLAT);
if (vp->da == attr_packet_type) {
request->packet->code = vp->vp_uint32;