Skip to content

Commit

Permalink
Fix custom values for dynamic clients
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Nov 9, 2024
1 parent c97e9a4 commit c4f8392
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/server/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,7 @@ fr_client_t *client_afrom_request(TALLOC_CTX *ctx, request_t *request)
case FR_FREERADIUS_CLIENT_IP_ADDRESS:
attr = "ipv4addr";
vb_to_str:
fr_sbuff_set_to_start(tmp);
if (unlikely(fr_pair_print_value_quoted(tmp, vp, T_BARE_WORD) < 0)) {
RERROR("Failed to convert %pP to string", vp);
error:
Expand Down Expand Up @@ -1016,8 +1017,8 @@ fr_client_t *client_afrom_request(TALLOC_CTX *ctx, request_t *request)
goto vb_to_str;

default:
RDEBUG2("Adding custom attribute %pP", vp);
attr = vp->da->name;
fr_sbuff_set_to_start(tmp);
fr_value_box_print(tmp, &vp->data, &fr_value_escape_single);
value = fr_sbuff_start(tmp);
v_token = T_SINGLE_QUOTED_STRING;
Expand Down

0 comments on commit c4f8392

Please sign in to comment.