(RADIATOR) Handler Identifier and Radonline

Hugh Irvine hugh at open.com.au
Wed Jul 4 08:25:04 CDT 2001


Salut Olivier -

The simple answer is to upgrade to Radiator 2.18.2.

The alternative is to add a line to the file "Radius/Handler.pm", 
just after the entry point to "handle_request" - something like this:

# Handle a request for a Handler
sub handle_request
{
     my ($self, $p) = @_;

     # Remember which Handler processed the packet
     $p->{Handler} = $self;

     &main::log($main::LOG_DEBUG,
	       "Handling request with Handler '$self->{Name}'");

#### ADD THIS LINE ####
     # Add a pseudo-attribute called "Handler-Identifier" to the request
     $p->add_attr('Handler-Identifier', $self->{Identifier});


This will add a pseudo-attribute to the current request called 
"Handler-Identifier", the value for which will be the Identifier.

You can then use the normal form of special character %{Handler-Identifier}.

OK?

A+

Hugues


At 14:38 +0200 01/7/4, Buisson Olivier wrote:
>Hi,
>
>Unfortunately, the special character %{Handler:Identifier} does'nt not work.
>I add an Indentifier on my Handler ( I see it on the logfile ). I use an old
>version of radiator ( 2.15 ). I'm not able for the moment to upgrade to 2.18
>version.
>Any ideas ?
>
>Olivier
>
>
>-----Message d'origine-----
>De : owner-radiator at open.com.au [mailto:owner-radiator at open.com.au]De la
>part de Hugh Irvine
>Envoye : mercredi 4 juillet 2001 12:04
>A : Buisson Olivier; radiator at open.com.au
>Objet : Re: (RADIATOR) Handler Identifier and Radonline
>
>
>
>Salut Olivier -
>
>This is very easy to do - just add an Identifier to your Handler, add
>a field for it to your RADONLINE table, then add a custom AddQuery
>using the special character %{Handler:Identifier} - something like
>this:
>
># define Handler(s) with Identifier(s)
>
><Handler .....>
>	Identifier ToTo
>	....
></Handler>
>
>.....
>
><SessionDatbase SQL>
>	Identifier .....
>	.....
>	AddQuery insert into RADONLINE (USERNAME, NASIDENTIFIER, NASPORT, \
>          ACCTSESSIONID, TIME_STAMP, FRAMEDIPADDRESS, NASPORTTYPE,
>SERVICETYPE \
>          HANDLERID) values ('%u', '%N', 0%{NAS-Port}, '%{Acct-Session-Id}',\
>          %{Timestamp}, '%{Framed-IP-Address}', '%{NAS-Port-Type}', \
>          '%{Service-Type}', '%{Handler:Identifier}')
>	....
></SessionDatabase>
>
>
>ca va comme ca?
>
>A+
>
>Hugues
>
>
>At 11:00 +0200 01/7/4, Buisson Olivier wrote:
>>Hi guys,
>>
>>For a special developement, I would like to add to RADONLINE, the Handler
>>identifier to it.
>>
>>I can't be able to get the right variable to get this.
>>
>>does'nt anybody can help me ?
>>
>>Cheers
>>
>>olivier
>>
>>
>>
>>===
>>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.
>
>--
>
>NB: I am travelling this week, so there may be delays in our correspondence.
>
>Radiator: the most portable, flexible and configurable RADIUS server
>anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
>Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
>Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.
>===
>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.
>
>===
>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.

-- 

NB: I am travelling this week, so there may be delays in our correspondence.

Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.
===
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