allow rule vs deny

I would like to add a new irule which permits all previous versions of Apple IOS from 6.145 and will deny anything release thereafter. This is our current rule

when HTTP_REQUEST {

switch -glob [string tolower [HTTP::header User-Agent]] {

“*1002.14[0-4]*” {

if { [HTTP::uri] contains “Cmd=MeetingResponse” } {

reject

log local0. “Denied iOS 6.1 Device SNAT src=[IP::client_addr] src_port=[TCP::client_port], dst=[IP::local_addr] dst_port=[TCP::local_port], virtual=[virtual name]”

}

}

}

}

Thank in advance.

Is your current rule not working?

If you are talking version numbers your probably better off converting and comparing numerically.

set num=*get field from user agent*
foreach {major minor sub} [split $num "."] break;

if { $major < 7 } {
  if { $minor < 1002 } {
     if { $sub < 145 } {
         reject
         log local0. "reject reason"
     }
  }
}

If however the version number is numerically valid..

if {$version < 1006.145} {
   reject
}