Forum Discussion
What_Lies_Bene1
Jan 17, 2013Cirrostratus
Ah OK. So, could you try with this somewhat tidied up code, also I'm sure there is an unnecessary bracket in there but can't be 100% as it's hard to keep all those ifs in my head at one time;
set rmp01_deny [table lookup -subtable $rmp01_db_contents [IP::client_addr]]
log local0. "client ip = [IP::client_addr], db address = $rmp01_db_contents"
if { [IP::client_addr] == $rmp01_db_contents } {
if {$static::rmp01_acl_log_accepted_requests == 1 } {
log local0. "the following client was dropped: [IP::client_addr]"
drop
return
}
log local0. "client is dropped"
drop
return
}
} << Is this required
elseif { $static::rmp01_acl_log_dropped_requests == 1 } {
log local0. "the following client was allowed: [IP::client_addr] "
}