Undef processing is a unique feature provided by AppExpert infrastructure in NetScaler. Every policy evaluation on AppExpert framework could result into TRUE, FALSE or UNDEF. So the UNDEF result vector is special here which will be hit when the expression processing or action on NetScaler could not be completed successfully. It will also be hit in cases where system is restricted in doing certain processing or limited by resources. When an Undef is hit, it has special meaning for policy evaluation.
Policy Undef Flow:
Undef processing is also done while applying actions for various expressions used in different parts of action.
Action Undef Flow:
When undef is hit in action then we just ignore processing that particular action or part of it and then continue processing rest of the actions. This is unlike undef hit on policies where we stop further policy evaluation and not apply any of the buffered actions. In most cases core reason for an undef hit in policies or actions could be a logical error in configured expression or problem with the input data while processing. In corner cases it could also be due to the fact that system is running out of resources or hitting some limitation. Undef processing is also done for other AppExpert objects like HTTP Callout.
System provides with three actions to take in case of an UNDEF event at policy level:
NOREWRITE – After stopping policy evaluation and flushing out Action stack we just let the transaction go through. Specific to Rewrite feature only.
RESET – Reset the client and linked server connection
DROP – Drop the connection silently
You can configure an undef action for individual policy/action or use the global undef action as defined. Any policy/action specific undefined action will override the global undefined action.
Example where undef can happen due to processing issue (wrong input data):
Expression B64DECODE – Decodes the Base64-encoded string by applying the Base64 decoding algorithm. The operation raises an UNDEF if text is not in B64-encoded format.
Example where undef can happen due to processing data on wire:
Expression “100 / HTTP.REQ.CONTENT_LENGTH” – If the incoming Content-Length is of 0 bytes then this expression will run into undef result because of divide by 0 error.