Fair enough, I've obviously not read all of the source and it has been some time since 
I last read the RFC's.

Let me rephrase the bug description:

My module contains the following code to determine the length of a attribute:

if (pair->type == PW_TYPE_STRING || pair->type == PW_TYPE_IPADDR) {
        sLen = strlen (pair->strvalue);
} else {
        sLen = pair->length;
}

This works when the module operates in a PRIMARY FreeRadius server (ie. one that gets 
the requests from the NAS directly).

This fails, due to the type being PW_TYPE_STRING when the module operates in a 
SECONDARY FreeRadius server (ie. one that gets its requests proxied by the PRIMARY 
server).

Which leaves me with these questions:
1. If not caused by the code in proxy.c I indicated, what is causing this discrepancy?
2. Why is pair->length correct for numbers but not for IP addresses?
3. Is pair->length always correct for strings?

BTW, I understand that the Radius protocol does not contain a type nor did I say it 
did. I figured that setting an attribute to be string while it contains all manner of 
8 bit and/or zero characters would foul up the INTERNAL attribute encoding of the 
proxied packet.

Regards,
Walter.


-----Original Message-----
From: Alan DeKok [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 11:06
To: [EMAIL PROTECTED]
Subject: Re: Bug in proxy.c 


"Walter Stroebel" <[EMAIL PROTECTED]> wrote:
> At line 288 in the 0.8.1 version in /src/main/proxy.c
> CHAP-CHALLENGE attribute is forwarded as PW_TYPE_STRING.
> This should be PW_TYPE_ABINARY.

  Huh?  No.  Absolutely not.

> I've checked the version currently in CVS and the bug is still there.

  Why is it a bug?  What problem does it create?


  If you would read the RFC's, the documentation, and the source code,
you would realize:

a) PW_TYPE_ABINARY is only for Ascend's stupid filter attributes
b) The CHAP-Challenge type is of type 'string'
c) the attribute type is ONLY internal to the server, and NEVER
   is sent in a RADIUS packet.

  Alan DeKok.

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to