Re: Help with Cisco AVPair Attributes

Sergey Poznyakoff <[email protected]>
Newsgroups gmane.comp.gnu.radius.general
Organization Farlep-Internet
Message-ID <[email protected]>
Hi Mikel,

Sorry it took me so long to reply.

> I've got accounting data coming into my RADIUS from a bunch of Cisco 1200AP
> Wireless access points. I'm trying to re-write Cisco-AVPair attributes, but
> I can't seem to get it working properly.
[...]
> What am I missing here?

You are doing everything right, except that there is a bug in your function
parse_cisco_avpair():

> integer
> parse_cisco_avpair()
> {
>         integer i;
>         while (*%[Cisco-AVPair](i))

The variable `i' is not initialized, so it is unpredictable what value it
will have at the entry to the loop. The correct beginning of the
function will be:

integer
parse_cisco_avpair()
{
        integer i;
	i = 0;
        while (*%[Cisco-AVPair](i))
	...

Regards,
Sergey
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.