Forum Discussion

Scott_Larson's avatar
Scott_Larson
Icon for Nimbostratus rankNimbostratus
Jul 03, 2007

Block 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 authentication works fine; even the NAME::lookup works fine (thru much trial and tribulation due to lacking documentation!!!) The problem is that since NAME::lookup is an asynchronous function, I need to block (wait) all HTTP requests until the lookup returns and I can determine whether the client is or isn't from .mil/.gov. The lookup is quick - nearly immediate - but it's not synchronous.

 

 

How does one block until the NAME_RESOLVED event fires?

 

Or, is there a synchronous version of the NAME::lookup function? or a TCL version of the function that might work?

 

Or does anyone have any other ideas?

 

11 Replies