Newbie001_11532
Jan 25, 2013Nimbostratus
iRule for Mobile
Hi All.
We are trying to setup an IRule to limit which devices can connect based on deviceID. The below rule works fine for mobiles that are not Windows but we end up with the below error when windows phones try to connect. Anyone know why? ta
TCL error: radius-extended AUTH_RESULT - bad field specifier e while executing binary scan
when HTTP_REQUEST {
Apply DeviceID restriction to all ActiveSync directory traffic
if {[HTTP::path] == "/Microsoft-Server-ActiveSync"} {
Determine whether connection is Base64 encoded, (Windows Phone) and if necessary begin decoding process
set string_b64encoded [HTTP::query]
if {[catch {b64decode $string_b64encoded} string_b64decoded] == 0 and $string_b64decoded ne ""} {
log local0.info "Successful login with deviceID: "
binary scan $string_b64decoded x4H2 IDlenHEX
scan $IDlenHEX %x IDlenDEC
set IDlen {expr "$IDlenDEC * 2"}
binary scan $string_b64decoded x5H$IDlen HEXdeviceID
set string_sentid [string toupper $HEXdeviceID]
} else {
set string_sentid [string toupper [URI::query [HTTP::uri]]]
}
log local0.info "String b64decoded = $string_b64decoded"
compare deviceID presented in HTTP::query with BigIP Data Group List - 'devices'
if {[matchclass $string_sentid contains devices]} {
log local0.info "Successful login with deviceID: $string_sentid"
} else {
log local0.info "Failed login with deviceID: $string_sentid"
}
}
}