(RADIATOR) More questions!

Adam Armstrong lists at memetic.org
Wed Aug 22 09:55:44 CDT 2007


Hugh Irvine wrote:
>
> Hello Adam -
>
> I may have misunderstood exactly what you want to do.
>
> From what you show below, it would be easier to do something like this 
> in your configuration file:
>
> .....
>
>     <AuthBy SQL>
>         ......
>         AuthSelect select PASSWORD, IP from SUBSCRIBERS \
>             where USERNAME = %0
>         AuthColumnDef 0, Password, check
>         AuthColumnDef 1, Framed-IP-Address, reply
>
>         AddToReply Framed-IP-Netmask = 255.255.255.255
>
>         .....
>     </AuthBy>
This would add empty replies if there was no IP field? I only weant the 
field added if a static IP has been specified, so a dynamic one will be 
assigned by the LNS :)

> .....
>
> The hook code you show below is adding the attributes to the request, 
> not the reply (only the request is availabe to the hook).
>
> If you do want to use a hook to do more complicated things, you could 
> use something like this to copy the attributes from the request to the 
> reply:
>
>
> .....
>     <AuthBy SQL>
>         ......
>         # copy attributes from the request to the reply
>         AddToReply Framed-IP-Address = %{Framed-IP-Address}, \
>             Framed-IP-Netmask = %{Framed-IP-Netmask}
>     </AuthBy>
> .....
>
Ahh, that seems like the way to do it!

Can i get it to do this only if those attributes exist? Does a 
postauthhook have access to the request?

Can i pass information from the postauthselecthook to the postauthhook?

Thanks,
adam.



--
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