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...
Deb_Allen_18
Jul 04, 2007Historic F5 Account
Nice job logging and debugging. This is exactly the way you should be approaching it.
I think the problem is the logical flow. This isn't well-documented but it seems that although HTTP::collect holds the data, it doesn't stop the processing of the current event (ie. HTTP_REQUEST), which continues to process the remaining commands while NAME::lookup (?? runs in the background? Not sure how they interact.)
Since in most cases NAME::lookup implies a pause in the action, and the remainder of the logic depends on it (as yours does), I'm pretty sure you just need to jump then from NAME::lookup to NAME_RESOLVED event and continue the action there.
So basically, I'd take all your other HTTP_REQUEST logic following the NAME::lookup command that depend on the results of the lookup, and move it down into the NAME_RESOLVED event before HTTP::release command.
HTH
/deb
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