unlang
Herwin Weststrate
herwin at quarantainenet.nl
Wed Apr 15 11:10:05 CEST 2015
On 15-04-15 10:52, Peter Balsianok wrote:
> Hi,
>
> I have following unlang code in the preacct section
>
> update request {
> Calling-Station-Id := "%{%{string:Class}:-%{Calling-Station-Id}}"
> }
>
> If my packet does not contain Class attribut, i expect that
> Calling-Station-Id will not change.
Then you have to test for that first
if (request:Class) {
update request {
Calling-Station-Id := "%{string:Class}"
}
}
Since we can be sure a Class attribute exists, we can skip the fallback
to Calling-Station-Id
--
Herwin Weststrate
More information about the Freeradius-Users
mailing list