FreeRADIUS + MySQL + DHCP Opt82

IVB ivb at is.ua
Fri Mar 30 15:20:47 CEST 2012


Fajar A. Nugraha-2 wrote
> 
> On Fri, Mar 30, 2012 at 6:12 PM, IVB <ivb@> wrote:
> 
>> Agent-Circuit-Id = 0x000403fc0001
> 
> let's start with that one.
> 
>>  ( '00:12:23:56:78:9A', 'Agent-Circuit-ID', x'000403fc0001', '==' ),
> 
> Does that work?
> 

No. And this is the problem.


Fajar A. Nugraha-2 wrote
> 
> Shouldn't it be something like
> 
> ( '00:12:23:56:78:9A', 'Agent-Circuit-ID', 0x000403fc0001, '==' ),
> 
> ?
> 

0x000403fc0001 and x'000403fc0001' are synonyms (as written in MySQL
documentation). But I check both variants - without success.


Fajar A. Nugraha-2 wrote
> 
> Another alternative is to insert something like this (note the operator)
> 
> ( '00:12:23:56:78:9A', 'Agent-Circuit-ID', 0x000403fc0001, ':=' ),
> 
> ... and then on authorize section add something like this (just for check)
> 
> if ( (request:User-Name == "00:12:23:56:78:9A") &&
> (control:Agent-Circuit-ID != "%{request:Agent-Circuit-ID}") ) {
>    update control {
>       Auth-Type := "Reject"
>   }
> }
> 
> then use debug mode again. It should print out what it recognize
> control:Agent-Circuit-ID (which is from db) and
> request:Agent-Circuit-ID. Then you just need to edit entry on db to
> match what's on the request.
> 
> 
OK, I'll try this and write results.

--
View this message in context: http://freeradius.1045715.n5.nabble.com/FreeRADIUS-MySQL-DHCP-Opt82-tp5606148p5606635.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.


More information about the Freeradius-Users mailing list