Forum Discussion
Scott_Larson
Nimbostratus
Jul 03, 2007Block until NAME::lookup returns?
For my iRule, I need to perform a reverse DNS lookup, and determine if a client IP is from a domain ending in .mil or .gov. This determines whether or not they need to authenticate. The authenticati...
spark_86682
Jul 05, 2007Historic F5 Account
Actually, this version works better:
when CLIENT_ACCEPTED {
set clientIP [IP::client_addr]
set resolved 0
TCP::collect
NAME::lookup $clientIP
}
when NAME_RESOLVED {
set client_name "[NAME::response]"
set resolved 1
TCP::release
}
when CLIENT_DATA {
if { $resolved == 0 } {
TCP::collect
} else {
TCP::release
}
}It solves a sort-of race condition between getting data and the name resolving.
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