On Mon, Mar 14, 2011 at 03:54:27PM +0100, Alan DeKok wrote:
You can see that only the first 'if' statement has been executed, and then it has dropped out of the module entirely, keeping the reject status.
That's how the "authenticate" section works. "reject" means "STOP AND REJECT".
Yes, but the 'if' statement didn't set any rcode at all. All it did was add a reply attribute. At the moment, it seems like: (1) individual 'if' statements are treated as if they were modules; (2) at the end of the 'if' body, the rcode is processed from the time the statement was entered, even if one was not set inside it. Let me put it another way. The following two bits of code behave completely differently: testing_module { update reply { Reply-Message += "Foo" } update reply { Reply-Message += "Bar" } ok } testing_module { if (1) { update reply { Reply-Message += "Foo" } } if (1) { update reply { Reply-Message += "Bar" } ok } } Should the wrapping of a statement with if (1) { .. } have such an effect?? Regards, Brian.