VLAN assignment based on NAS ID

Arran Cudbard-Bell a.cudbardb at freeradius.org
Tue Mar 23 01:18:24 CET 2021



> On Mar 22, 2021, at 10:03 PM, Alan DeKok <aland at deployingradius.com> wrote:
> 
> On Mar 22, 2021, at 5:05 PM, Max Elzinga <m.elzinga at felton.nl> wrote:
>> 
>> Hi Alan,
>> 
>> Here is the log file:
> 
>  So... you're not going to read it, to see if it's applying the rules you added?

Unless the code in v3.0.x differs to master, the operator would be '<' i.e. LHS is within the set on the RHS. The cast would turn the LHS into a 32bit prefix which isn't going to match the RHS which is a 24bit prefix, so '==' won't work.

The condition should be:

if (<ipv4prefix>&NAS-IP-Address < 10.2.16.0/24) {

I can never remember the IP address comparison operators either.

-Arran
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20210323/815788ab/attachment.sig>


More information about the Freeradius-Users mailing list