Hello, I'm performing some filtering, based on the client, in the authorize section of inner-tunnel: authorize { preprocess rewrite.calling_station_id if ("%{clients:shortname}" =~ /internal_radius_(.*)/i) { ok update control { Auth-Type := Accept } } ... } The output logs in debug mode show the following warning: .. ++? if ("%{clients:shortname}" =~ /internal_radius_(.*)/i) WARNING: Unknown module "clients" in string expansion "%" .. Does this mean that the 'if ("%{clients:shortname}"...' clause is not being evaluated? How can I solve the problem generating the warning? Thank you, Stefano
On Jun 23, 2015, at 8:39 AM, Stefano Zanmarchi <zanmarchi@gmail.com> wrote:
The output logs in debug mode show the following warning: .. ++? if ("%{clients:shortname}" =~ /internal_radius_(.*)/i) WARNING: Unknown module "clients" in string expansion "%" ..
Does this mean that the 'if ("%{clients:shortname}"...' clause is not being evaluated? How can I solve the problem generating the warning?
Spell it correctly. Use "%{client:shortname}" Alan DeKok.
On 23-06-15 14:39, Stefano Zanmarchi wrote:
Hello, I'm performing some filtering, based on the client, in the authorize section of inner-tunnel:
authorize { preprocess rewrite.calling_station_id if ("%{clients:shortname}" =~ /internal_radius_(.*)/i) { ok update control { Auth-Type := Accept } } ... }
The output logs in debug mode show the following warning: .. ++? if ("%{clients:shortname}" =~ /internal_radius_(.*)/i) WARNING: Unknown module "clients" in string expansion "%" ..
Does this mean that the 'if ("%{clients:shortname}"...' clause is not being evaluated? How can I solve the problem generating the warning?
You need client: instead of clients: there are some examples in policy.d/ on this usage (although no shortname is there). -- Herwin Weststrate
That was the problem :-( Thank you so much! On Tue, Jun 23, 2015 at 2:39 PM, Stefano Zanmarchi <zanmarchi@gmail.com> wrote:
Hello, I'm performing some filtering, based on the client, in the authorize section of inner-tunnel:
authorize { preprocess rewrite.calling_station_id if ("%{clients:shortname}" =~ /internal_radius_(.*)/i) { ok update control { Auth-Type := Accept } } ... }
The output logs in debug mode show the following warning: .. ++? if ("%{clients:shortname}" =~ /internal_radius_(.*)/i) WARNING: Unknown module "clients" in string expansion "%" ..
Does this mean that the 'if ("%{clients:shortname}"...' clause is not being evaluated? How can I solve the problem generating the warning?
Thank you, Stefano
participants (3)
-
Alan DeKok -
Herwin Weststrate -
Stefano Zanmarchi