SQL help from someone who groks c, please?

Dan Mahoney, System Admin danm at prime.gushi.org
Thu Feb 8 22:30:45 CET 2007


On Thu, 8 Feb 2007, ChristosH wrote:

>
>
> Phil Mayers wrote:
>>
>> A stored procedure is one solution to a particular set of problems.
>> Whether it's appropriate depends on what you're trying to do.
>>
>> What do you want to achieve? You can certainly vary the reply info based
>> on NAS without a stored procedure.
>>
>
> Well, what I want to do is return a different vendor specific response based
> on the NAS IP.  The user data doesn't change depending on the NAS IP, but
> depending on where the user tries to authenticate from they'll have a
> different source NAS IP in the authenticate request packet and my response
> has to return a different response depending on where they are. Right now I
> have only 2 different responses that they could be, so I don't think it
> should be too difficult. Is there a quick workaround?

Okay, so create a table with your NASes, include the IP adderss, include a 
"type" flag.

Create another table with the responses for each type, join to the query 
on the "type" flag.  Use those responses.

-Dan

--

"A mother can be an inspiration to her little son, change his thoughts,
his mind, his life, just with her gentle hum."

-No Doubt, "Different People", from "Tragic Kingdom"


--------Dan Mahoney--------
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144   AIM: LarpGM
Site:  http://www.gushi.org
---------------------------




More information about the Freeradius-Users mailing list