Forum Discussion
Chura_16140
Nimbostratus
Jul 28, 2014can't read "Blackhole_Match"
Hi,
I'm using https://devcentral.f5.com/articles/v111-dns-blackhole-with-irules
to blackhole some domains.
However, once every few requests I see this error :
Jul 28 18:51:30 err tmm3[10586...
Kevin_Stewart
Employee
Jul 28, 2014That'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?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects