Weird issue - threads bottleneck in post-proxy section

"RESTOUX, Loïc" loic.restoux at capgemini.com
Mon Mar 9 11:48:23 CET 2015


Hi,

Le 06/03/2015 19:32, Alan DeKok a écrit :
> If you have “correct_escapes = yes”, then vpt->len is the length of 
> the data in vpt->name. If it’s not, there’s a problem. 
You're right. I did NOT set correct_escapes in my configuration, and now 
all is working (including the length of regexps) when correct_escape = 
true. So I assume that the default value is false, right ? That may 
explain why you couldn't reproduce it.

Thank you very much !

Still, I cannot figure out why the behaviour is not the same with 
correct_escape = false. We do not use backslashes in our configuration.

> Even tracking down where the length goes wrong should be helpful.
I added some logs to track down the issue. The line to be parsed is:
     if ("%{proxy-reply:Packet-Type}" == "Access-Accept") {

Here's the result (I focus on the RHS here, but same result with LHS) 
with correct_escape=false:

BEGIN condition_tokenize(start=("%{proxy-reply:Packet-Type}" == 
"Access-Accept") {)
BEGIN condition_tokenize(start="%{proxy-reply:Packet-Type}" == 
"Access-Accept") {)
CONT condition_tokenize - Grab the RHS
BEGIN condition_tokenize_string( start="Access-Accept") {, op=0x 0 )
END condition_tokenize_string() => 15
CONT condition_tokenize - Grab the RHS => rhs=Access-Accept, type=25, 
slen=15
CONT condition_tokenize(): try to extract a string from rhs 
Access-Accept (type=25)
BEGIN tmpl_afrom_str(in=Access-Accept, inlen=16)
CONT tmpl_afrom_str( type=T_DOUBLE_QUOTED_STRING )
END tmpl_alloc(name=Access-Accept, len=16) => vpt-name=Access-Accept, 
vpt->len=16
END tmpl_afrom_str() => vpt->name=Access-Accept, vpt->len=16, return=16
CONT condition_tokenize - Grab the RHS
BEGIN condition_tokenize_string( start="Access-Accept") , op=0x 0 )
END condition_tokenize_string() => 15
CONT condition_tokenize - Grab the RHS => rhs=Access-Accept, type=25, 
slen=15
CONT condition_tokenize(): try to extract a string from rhs 
Access-Accept (type=25)
BEGIN tmpl_afrom_str(in=Access-Accept, inlen=15)
CONT tmpl_afrom_str( type=T_DOUBLE_QUOTED_STRING )
END tmpl_alloc(name=Access-Accept, len=15) => vpt-name=Access-Accept, 
vpt->len=15
END tmpl_afrom_str() => vpt->name=Access-Accept, vpt->len=15, return=15
END condition_tokenize(start="%{proxy-reply:Packet-Type}" == 
"Access-Accept") ) => 49
END condition_tokenize(start=("%{proxy-reply:Packet-Type}" == 
"Access-Accept") ) => 50

Then with correct_escape=true:

BEGIN condition_tokenize(start=("%{proxy-reply:Packet-Type}" == 
"Access-Accept") {)
BEGIN condition_tokenize(start="%{proxy-reply:Packet-Type}" == 
"Access-Accept") {)
CONT condition_tokenize - Grab the RHS
BEGIN condition_tokenize_string( start="Access-Accept") {, op=0x 0 )
END condition_tokenize_string() => 15
CONT condition_tokenize - Grab the RHS => rhs=Access-Accept, type=25, 
slen=15
CONT condition_tokenize(): try to extract a string from rhs 
Access-Accept (type=25)
BEGIN tmpl_afrom_str(in=Access-Accept, inlen=13)
CONT tmpl_afrom_str( type=T_DOUBLE_QUOTED_STRING )
END tmpl_alloc(name=Access-Accept, len=13) => vpt-name=Access-Accept, 
vpt->len=13
END tmpl_afrom_str() => vpt->name=Access-Accept, vpt->len=13, return=13
CONT condition_tokenize - Grab the RHS
BEGIN condition_tokenize_string( start="Access-Accept") , op=0x 0 )
END condition_tokenize_string() => 15
CONT condition_tokenize - Grab the RHS => rhs=Access-Accept, type=25, 
slen=15
CONT condition_tokenize(): try to extract a string from rhs 
Access-Accept (type=25)
BEGIN tmpl_afrom_str(in=Access-Accept, inlen=13)
CONT tmpl_afrom_str( type=T_DOUBLE_QUOTED_STRING )
END tmpl_alloc(name=Access-Accept, len=13) => vpt-name=Access-Accept, 
vpt->len=13
END tmpl_afrom_str() => vpt->name=Access-Accept, vpt->len=13, return=13
END condition_tokenize(start="%{proxy-reply:Packet-Type}" == 
"Access-Accept") ) => 49
END condition_tokenize(start=("%{proxy-reply:Packet-Type}" == 
"Access-Accept") ) => 50

As you can see, the vpt-len differs.

HTH,

-- 
LRS
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.



More information about the Freeradius-Users mailing list