help-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnu-radius] Missing Attribute


From: Sergey Poznyakoff
Subject: Re: [Help-gnu-radius] Missing Attribute
Date: Mon, 01 Jul 2002 11:09:49 +0300

> 1. It is possible to group some nas'es by different attributes ?

A NAS should send at least one of NAS-IP-Address or NAS-Identifier
attribute (or both). See if your NAS sends NAS-Identifier, if so
it can be used in huntgroups. Otherwise, it is trivial to add
NAS-IP-Address to the packet:

Index: radiusd/radius.c
===================================================================
RCS file: /cvsroot/radius/radius/radiusd/radius.c,v
retrieving revision 1.20
diff -p -u -w -b -r1.20 radius.c
--- radius.c    19 Dec 2001 14:05:08 -0000      1.20
+++ radius.c    1 Jul 2002 08:06:55 -0000
@@ -474,6 +474,12 @@ radrecv(host, udp_port, buffer, length)
                ptr += attrlen;
                length -= attrlen;
        }
+       if (!avl_find(first_pair, DA_NAS_IP_ADDRESS)) {
+               pair =  avp_create(DA_NAS_IP_ADDRESS,
+                                   0, NULL,
+                                   host);
+               avl_add_pair(&first_pair, pair);
+       }
        radreq->request = first_pair;
        return(radreq);
 }


By the way, it is good to do so anyway. Thanks for the tip!

> 2. It is some other way to call the rewrite funtion particular for a NAS ?
> ( not huntgroups nor hints - hints are based on username.
>   Something like: in naslist - NAS_name Short_name Type Checkrad_flags
> Rewrite_function)

No, not currently. Applying the above patch should make it
unnecessary, though.

Regards,
Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]