Hello,
I am training at FreeRADIUS, and I'm writting my own module to make different
stuff on request. It works well.
I use FreeRADIUS snapshot-20040102.
I think I've found an error in the libradius, in the file valuepair.c, into the
function pairreplace.
My valuepair.c is in version 1.74, but it seems, in CVS logs, that this function
did not evolve.
I join the patch at the end of this mail, done using diff, but without the -u
option - not available on
Solaris.
The problem is that when replacing an A/V pair by another, if the A/V pair to
replace is the last one, the loop exits before to reach it. Therefore, the A/V
pair is present twice.
Thanks for updates about it.
Geoffroy
Path starts here:
178c178
< VALUE_PAIR *i, *next;
---
> VALUE_PAIR *i, *next, *prev;
180a181,185
> /*
> Quiet compiler
> */
> prev = NULL;
>
191c196
< for(i = *first; i->next; i = next) {
---
> for(i = *first; i; i = next) {
199a205
> prev = i;
206c212
< i->next = add;
---
> prev->next = add;
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html