replacement for FR function

Alan DeKok aland at deployingradius.com
Wed Oct 14 16:37:43 CEST 2015


On Oct 14, 2015, at 10:20 AM, Lotkov Svyatoslav <ellezdi at gmail.com> wrote:
> How can I validate value-pair's value against avpair ?
> This is done in FR2 by pairparsevalue() function.
> 
> I tried to use fr_pair_value_from_str() like this:
> 
> //else if (pairparsevalue(*last, d) == NULL) {
> 
> else if (fr_pair_value_from_str(*last, d, sizeof(d)) == -1 ) {
> 
> But the result is:
> 
> Bad talloc magic value - unknown value
> talloc abort: Bad talloc magic value - unknown value

  Probably because you didn't allocate the VALUE_PAIR using the correct functions.

  Don't call malloc().  Call the various pair() functions to create it by name or by number.

  Alan DeKok.




More information about the Freeradius-Users mailing list