Minor policy.d/operator-name fix #87

Merged
merged 1 commit into from Oct 4, 2012

3 participants

@armitasp
FreeRADIUS project member

fixed Packet-Type unlang match

@armitasp armitasp Minor Fix to policy.d/operator-name
fixed Packet-Type unlang match
8ad4faa
@armitasp
FreeRADIUS project member

hmm, my testing suggested otherwise:

(148) Wed Sep 12 22:11:42 2012 : Debug: group pre-proxy {
(148) Wed Sep 12 22:11:42 2012 : Debug: - entering group pre-proxy {...}
(148) Wed Sep 12 22:11:42 2012 : Debug: policy operator-name.pre-proxy {
(148) Wed Sep 12 22:11:42 2012 : Debug: - entering policy operator-name.pre-proxy {...}
(148) Wed Sep 12 22:11:42 2012 : Debug: ? if (request:Packet-Type == Access-Request && "%{client:operator-name}")
(148) Wed Sep 12 22:11:42 2012 : Debug: (Attribute request:Packet-Type was not found)
(148) Wed Sep 12 22:11:42 2012 : Debug: ? Evaluating (request:Packet-Type == Access-Request ) -> FALSE
(148) Wed Sep 12 22:11:42 2012 : Debug: ? Skipping ("%{client:operator-name}")
(148) Wed Sep 12 22:11:42 2012 : Debug: ? if (request:Packet-Type == Access-Request && "%{client:operator-name}") -> FALSE
(148) Wed Sep 12 22:11:42 2012 : Debug: - policy operator-name.pre-proxy returns noop

compared with

) Wed Sep 12 22:19:01 2012 : Debug: group pre-proxy {
(9) Wed Sep 12 22:19:01 2012 : Debug: - entering group pre-proxy {...}
(9) Wed Sep 12 22:19:01 2012 : Debug: policy operator-name.pre-proxy {
(9) Wed Sep 12 22:19:01 2012 : Debug: - entering policy operator-name.pre-proxy {...}
(9) Wed Sep 12 22:19:01 2012 : Debug: ? if ("%{request:Packet-Type}" == "Access-Request" && "%{client:operator-name}")
(9) Wed Sep 12 22:19:01 2012 : Debug: expand: %{request:Packet-Type} -> Access-Request
(9) Wed Sep 12 22:19:01 2012 : Debug: ? Evaluating ("%{request:Packet-Type}" == "Access-Request" ) -> TRUE
(9) Wed Sep 12 22:19:01 2012 : Debug: expand: %{client:operator-name} -> 1lboro.ac.uk
(9) Wed Sep 12 22:19:01 2012 : Debug: ? Evaluating ("%{client:operator-name}") -> TRUE
(9) Wed Sep 12 22:19:01 2012 : Debug: ? if ("%{request:Packet-Type}" == "Access-Request" && "%{client:operator-name}") -> TRUE
(9) Wed Sep 12 22:19:01 2012 : Debug: if ("%{request:Packet-Type}" == "Access-Request" && "%{client:operator-name}") {
(9) Wed Sep 12 22:19:01 2012 : Debug: - entering if ("%{request:Packet-Type}" == "Access-Request" && "%{client:operator-name}") {...}
(9) Wed Sep 12 22:19:01 2012 : Debug: update proxy-request {
(9) Wed Sep 12 22:19:01 2012 : Debug: expand: %{client:operator-name} -> 1lboro.ac.uk

@arr2036
FreeRADIUS project member

sigh there must be a paircompare callback. This is is ridiculous.

@armitasp
FreeRADIUS project member

doh! :$ sorry. that was so obvious.

nd: %{request:Packet-Type} -> Access-Request
(8) Wed Sep 12 22:19:01 2012 : Debug: ? Evaluating ("%{request:Packet-Type}" == "Access-Request" ) -> TRUE
(8) Wed Sep 12 22:19:01 2012 : Debug: expand: %{client:operator-name} -> 1lboro.ac.uk
(8) Wed Sep 12 22:19:01 2012 : Debug: ? Evaluating ("%{client:operator-name}") -> TRUE
(8) Wed Sep 12 22:19:01 2012 : Debug: ? if ("%{request:Packet-Type}" == "Access-Request" && "%{client:operator-name}") -> TRUE
(8) Wed Sep 12 22:19:01 2012 : Debug: if ("%{request:Packet-Type}" == "Access-Request" && "%{client:operator-name}") {
(8) Wed Sep 12 22:19:01 2012 : Debug: - entering if ("%{request:Packet-Type}" == "Access-Request" && "%{client:operator-name}") {...}
(8) Wed Sep 12 22:19:01 2012 : Debug: update proxy-request {
(8) Wed Sep 12 22:19:01 2012 : Debug: expand: %{client:operator-name} -> 1lboro

@arr2036
FreeRADIUS project member

@alandekok Its shit from a usability point of view. You have absolutely no way of telling that Packet-Type is an actual pair or a callback.

@armitasp not merging until this works as a straight expansion without the xlat syntax, feel free to submit patches.

@alandekok
FreeRADIUS project member
@arr2036 arr2036 merged commit 150632f into FreeRADIUS:master Oct 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment