(RADIATOR) How to send specifier values to hooks??
Hugh Irvine
hugh at open.com.au
Wed Feb 2 23:55:36 CST 2005
Hello Michael -
The address the request was received from is available in
$p->{RecvFrom}
and
$p->{RecvFromAddress}
so yes you can use format_special, or just use the above directly.
See the code in "Radius/Radius.pm" sub newRecvFrom().
regards
Hugh
On 2 Feb 2005, at 18:02, Michael Harsh wrote:
> Thanks for the reply Hugh.
>
> What if the client is a Radius proxy and not a NAS? The Radius proxy
> IP does
> not show up in the packet as an attribute, and that is what I would
> like to
> get.
>
> So, I had thought I could use the special character, %c, to send the
> client
> IP to a hook from the config file. As I've continued reading it looks
> like I
> can call Radius::Util::format_special and use %c from anywhere in my
> own
> code to get the IP of a Radius client if it is not a NAS. Am I going
> in the
> right direction here?
>
> Thanks again,
> Mike Harsh
>
> -----Original Message-----
> From: Hugh Irvine [mailto:hugh at open.com.au]
> Sent: Tuesday, February 01, 2005 6:57 PM
> To: Michael Harsh
> Cc: 'radiator at open.com.au'
> Subject: Re: (RADIATOR) How to send specifier values to hooks??
>
>
>
> Hello Michael -
>
> The hook has access to the incoming request and you can access any
> attributes in the request.
>
> The client IP address can be accessed with
>
> my $clientip = $p->get_attr('NAS-IP-Address');
>
> See the example hooks in "goodies/hooks.txt".
>
> regards
>
> Hugh
>
>
> On 1 Feb 2005, at 22:57, Michael Harsh wrote:
>
>> Hello all,
>>
>> How do you send the value of a specifier/special character to a hook?
>> For
>> instance, I want to send the Radius client IP address, using %c, to a
>> hook
>> to insert it into the Radius packet.
>>
>> Thanks,
>> Mike Harsh
>>
>> --
>> 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:
>
> Have you read the reference manual ("doc/ref.html")?
> Have you searched the mailing list archive
> (www.open.com.au/archives/radiator)?
> Have you had a quick look on Google (www.google.com)?
> Have you included a copy of your configuration file (no secrets),
> together
> with a trace 4 debug showing what is happening?
>
> --
> Radiator: the most portable, flexible and configurable RADIUS server
> anywhere. Available on *NIX, *BSD, Windows, MacOS X.
> -
> Nets: internetwork inventory and management - graphical, extensible,
> flexible with hardware, software, platform and database independence.
> -
> CATool: Private Certificate Authority for Unix and Unix-like systems.
>
> --
> 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:
Have you read the reference manual ("doc/ref.html")?
Have you searched the mailing list archive
(www.open.com.au/archives/radiator)?
Have you had a quick look on Google (www.google.com)?
Have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.
--
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