That's very strange. The variable is created in the DNS_REQUEST event, so the error would indicate that this isn't happening for some random DNS_RESPONSE. There are at least two ways to mitigate this error:
-
Place a catch around the entire section of code.
if { [catch {
if { $Blackhole_Match } {
...
}
} err]} {
some error occurred
}
-
Perform an [info exists ] function before checking for the variable.
if { ( [info exists Blackhole_Match] ) and ( $Blackhole_Match ) } {
...
}
The question then becomes, what do you want to if an error occurs or the variable doesn't exists?