Jonathan_Archer
Mar 15, 2013Nimbostratus
Match Radius.Class attributes
We need to compare variables in the radius class attribute that are returned via an APM radius auth. The class attribute is stored in the APM in hex so I need to convert the hex to string.
I have tried
set e_fields [split [mcget {session.radius.last.attr.class}] "|"];
set strAceServer [expr { [lindex $e_fields 0] }];
set strAceServer [binary format c* $strAceServer];
return $strAceServer;
and
set e_fields [split [mcget {session.radius.last.attr.class}] "|"];
foreach field $e_fields {
if ($field contains "*ace*") {
return "YES";
}
};
returns the hex
set e_fields [split [mcget {session.radius.last.attr.class}] "|"];
return [expr { [lindex $e_fields 0] }]
Any help would be appreciated to sort out the code.