[master] questions about recent changes in xlat

Alan DeKok aland at deployingradius.com
Sun Oct 25 18:27:04 CET 2020


On Oct 25, 2020, at 12:38 PM, Chaigneau, Nicolas via Freeradius-Devel <freeradius-devel at lists.freeradius.org> wrote
> Alright, I found out why it does not work.
> 
> In function _xlat_eval:
> 
> 	len = xlat_tokenize_ephemeral(ctx, &node, NULL,
> 				      &FR_SBUFF_IN(fmt, strlen(fmt)),
> 				      NULL, &(tmpl_rules_t){ .dict_def = request->dict });
> 
> 
> _xlat_eval does not provide a "fr_sbuff_parse_rules_t" with the escape function.
> As compared with the code in unit tests, which does:
> 
> 			fr_sbuff_parse_rules_t	p_rules = { .escapes = &fr_value_unescape_double };
> 
> 			slen = xlat_tokenize_ephemeral(xlat_ctx, &head, NULL,
> 						       &FR_SBUFF_IN(fmt, talloc_array_length(fmt) - 1), &p_rules, NULL);

  Changing that doesn't make any difference in my tests.

  I've added a test to src/tests/keywords/xlat-escape.  It does what I expect it to do.

  So... what's the use-case for your tests?  How can I reproduce them here?

  Alan DeKok.




More information about the Freeradius-Devel mailing list