Forum Discussion
Kai_Wilke
Dec 08, 2016MVP
Hi Anthony,
The first column of the data-group is the "search string" and the seconds column is the "return-value" of the data-group entry. The
equals
, contains
, starts_with
or ends_with
operators of the [class match]
command is always comparing your $input
with the "search strings" of the given datagroup and then may or may not return the return-data or simply boolean 0|1 depending on the used [class]
command syntax...
You can give it another try using the slightly polished iRule below...
when CLIENT_DATA {
log "Irule OK - The vlan is [RADIUS::avp 81]"
if { [class match [RADIUS::avp 81] equals vlancheck] } {
log "Vlan OK"
} else {
log "Vlan not OK"
}
}
... in combination with a modified data-group...
ltm data-group internal vlancheck {
records {
202 { }
203 { }
}
type string
}
Cheers, Kai