Alex_Chan_88951
Jul 21, 2008Nimbostratus
Add data in the class
I have create a class "rate_limit_black_list" in the gui, this class store the black list host. But when i cannot use irule to insert data in the group. is my irule syntax problem or what makes me cannot do that ? thanks.
I have add "1.1.1.1" in the class, so "tested" can print in the log. And when the office ip match the client ip all statement is processed, I can see "office ip black listed" in the log and the the web page show collectly. Just the lappend that statement not working, please help.....thanks.
when HTTP_REQUEST {
set client_ip [IP::remote_addr]
set office_ip "xxx.xxx.xxx.xxx"
set test "1.1.1.1"
if {[matchclass $test equals $::rate_limit_black_list]}{
log local0.info "tested"
}
if { $office_ip == $client_ip }{
lappend "$client_ip\n" $::rate_limit_black_list
log local0.info "office ip black listed"
pool http_01
}
}