On Oct 14, 2015, at 10:37 AM, Alan DeKok <aland@deployingradius.com> wrote:
On Oct 14, 2015, at 10:20 AM, Lotkov Svyatoslav <ellezdi@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.
Added notes here: http://wiki.freeradius.org/contributing/Modules3#talloc -Arran