Using unlang to customize Tunnel-Medium-Type for 3com switches
Alan DeKok
aland at deployingradius.com
Tue Sep 20 14:22:07 CEST 2011
Stanisław Kamiński wrote:
> After looking at unlang man page - explains the basics, but show no
> examples; radiusd.conf - still no examples; and googling - some
> examples, but I counted 4 of them (maybe I searched the wrong way, but
> see for yourself what does "unlang examples" yield) I decided to write
> here for help.
raddb/policy.conf has a number of examples.
> From what I read, I should add the condition in "post-auth" section. As
> I understand it, it should look like this:
>
> if ( "%{request:3Com-Product-ID}" == "4200G" ) {
> update reply {
> Tunnel-Medium-Type = "802"
> }
> }
Or simpler:
if (3Com-Product-Id == "4200G") {
...
}
The "%{request:...}" isn't needed.
> is that about right? (and yes, I should find that by myself, only
> explanation is that test system setup would take ~3-4 hrs and I can't do
> testing on production - whereas I count on you being able to tell right
> from wrong in about ~5 sec).
Asking good questions is good.
Alan DeKok.
More information about the Freeradius-Users
mailing list