(RADIATOR) PreHandlerHook (question)

Hugh Irvine hugh at open.com.au
Thu Sep 6 00:57:36 CDT 2001


Hello Paul -

>
> I want to be able to use the PreHandlerHook to be able to compare a
> radius attribute "Class"
> and then change it to something else if matched. Can this be done?
>
> IE. If the incoming packet contains the attribute (Class -> perm) then I
> want to be able
> to change this to Class -> pstn
>
> This is required in order to stop permanent customers from dialing into
> our pstn AS pool.
>
> We have something similar for the other way around, but this just
> converts all Class's to perm
> and this method will not work the other way as not all Class's will be
> pstn only.
> I.E.
> PreHandlerHook sub { ${$_[0]}->add_attr('Class', 'perm'); }
>

This is very simple to do. 

Have a look at the example hooks in the file "goodies/hooks.txt" to see how 
it is done.

regards

Hugh


-- 
Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list