Sorry,<div><br></div><div>update the userparse() i use is:</div><div><br></div><div><div>FR_TOKEN userparse(const char *buffer, VALUE_PAIR **first_pair)</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>VALUE_PAIR<span class="Apple-tab-span" style="white-space:pre"> </span>*vp, *head, **tail;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>const char<span class="Apple-tab-span" style="white-space:pre"> </span>*p;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>FR_TOKEN<span class="Apple-tab-span" style="white-space:pre"> </span>last_token = T_OP_INVALID;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>FR_TOKEN<span class="Apple-tab-span" style="white-space:pre"> </span>previous_token;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>/*</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> *<span class="Apple-tab-span" style="white-space:pre"> </span>We allow an empty line.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> */</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>if (buffer[0] == 0)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>return T_EOL;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>head = NULL;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>tail = &head;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>p = buffer;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>do {</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>previous_token = last_token;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>if ((vp = pairread(&p, &last_token)) == NULL) {</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>break;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>*tail = vp;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>tail = &((*tail)->next);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>} while (*p && (last_token == T_COMMA));</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>/*</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> *<span class="Apple-tab-span" style="white-space:pre"> </span>Don't tell the caller that there was a comment.</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> */</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>if (last_token == T_HASH) {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>last_token = previous_token;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>if (last_token == T_OP_INVALID) {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>pairfree(&head);</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>} else {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>pairadd(first_pair, head);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>/*</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> *<span class="Apple-tab-span" style="white-space:pre"> </span>And return the last token which we read.</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> */</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>return last_token;</div><div>}</div><div><br></div><br><div class="gmail_quote">
On Thu, Mar 7, 2013 at 2:15 PM, kao quadrantx <span dir="ltr"><<a href="mailto:quadrantx@gmail.com" target="_blank">quadrantx@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<div><br></div><div>i rebuild freeradius with the latest updated today (i noticed the userparse() in valuepair.c has updated) and the memory leak still the same.</div><div>(same memory growth in VmRSS and same valgrind log.)</div>
<div><br></div><div><div>FR_TOKEN userparse(const char *buffer, VALUE_PAIR **list)</div><div>{</div><div> VALUE_PAIR *vp, *head, **tail;</div><div> const char *p;</div><div> FR_TOKEN last_token = T_OP_INVALID;</div>
<div> FR_TOKEN previous_token;</div><div> VALUE_PAIR_RAW raw;</div><div><br></div><div> /*</div><div> * We allow an empty line.</div><div> */</div><div> if (buffer[0] == 0)</div>
<div> return T_EOL;</div><div><br></div><div> head = NULL;</div><div> tail = &head;</div><div><br></div><div> p = buffer;</div><div> do {</div><div> raw.l_opand[0] = '\0';</div>
<div> raw.r_opand[0] = '\0';</div><div><br></div><div> previous_token = last_token;</div><div><br></div><div> last_token = pairread(&p, &raw);</div><div> if (last_token == T_OP_INVALID) break;</div>
<div><br></div><div> vp = pairmake(raw.l_opand, raw.r_opand, raw.op);</div><div> if (!vp) break;</div><div><br></div><div> if (raw.quote == T_DOUBLE_QUOTED_STRING) {</div><div>
if (pairmark_xlat(vp, raw.r_opand) < 0) {</div><div> pairbasicfree(vp);</div><div><br></div><div> break;</div><div> }</div>
<div> }</div><div><br></div><div> *tail = vp;</div><div> tail = &((*tail)->next);</div><div> } while (*p && (last_token == T_COMMA));</div><div><br></div>
<div> /*</div><div> * Don't tell the caller that there was a comment.</div><div> */</div><div> if (last_token == T_HASH) {</div><div> last_token = previous_token;</div>
<div> }</div><div><br></div><div> if (last_token == T_OP_INVALID) {</div><div> pairfree(&head);</div></div><div><div> } else {</div><div> pairadd(list, head);</div><div>
}</div><div><br></div><div> /*</div><div> * And return the last token which we read.</div><div> */</div><div> return last_token;</div><div>}</div></div><div><br></div><div><br></div>
<div>I have checked the radius log with debug_level = 3</div><div>There is no error message "Exec-Program-Wait: ...: unparsable reply" that you mentioned.</div><div><br></div><div><div>Thu Mar 7 13:38:04 2013 : Info: Ready to process requests.</div>
<div>Thu Mar 7 13:38:28 2013 : Debug: Threads: total/active/spare threads = 32/0/32</div><div>Thu Mar 7 13:38:28 2013 : Debug: Threads: deleting 1 spare out of 1 spares</div><div>Thu Mar 7 13:38:28 2013 : Debug: Thread 32 got semaphore</div>
<div>Thu Mar 7 13:38:28 2013 : Debug: Waking up in 0.9 seconds.</div><div>Thu Mar 7 13:38:28 2013 : Debug: Thread 30 got semaphore</div><div>Thu Mar 7 13:38:28 2013 : Debug: Thread 32 handling request 0, (1 handled so far)</div>
<div>Thu Mar 7 13:38:28 2013 : Debug: Thread 30 waiting to be assigned a request</div><div>Thu Mar 7 13:38:28 2013 : Info: [<thread>] # Executing section authorize from file /ramfs/radius/etc/raddb/sites-enabled/default</div>
<div>Thu Mar 7 13:38:28 2013 : Info: [<thread>] +- entering group authorize {...}</div><div>Thu Mar 7 13:38:28 2013 : Info: [detail_log] <span style="white-space:pre-wrap"> </span>expand: /ramfs/radius/var/log/radius/radius.log1 -> /ramfs/radius/var/log/radius/radius.log1</div>
<div>Thu Mar 7 13:38:28 2013 : Info: [detail_log] /ramfs/radius/var/log/radius/radius.log1 expands to /ramfs/radius/var/log/radius/radius.log1</div><div>Thu Mar 7 13:38:28 2013 : Info: [detail_log] <span style="white-space:pre-wrap"> </span>expand: %t <span style="white-space:pre-wrap"> </span>Src-IP-Address = %{Packet-Src-IP-Address} -> Thu Mar 7 13:38:28 2013 <span style="white-space:pre-wrap"> </span>Src-IP-Address = 192.168.1.93</div>
<div>Thu Mar 7 13:38:28 2013 : Info: ++[detail_log] returns ok</div><div>Thu Mar 7 13:38:28 2013 : Info: ++[preprocess] returns ok</div><div>Thu Mar 7 13:38:28 2013 : Info: ++[chap] returns noop</div><div>Thu Mar 7 13:38:28 2013 : Info: ++[mschap] returns noop</div>
<div>Thu Mar 7 13:38:28 2013 : Info: [suffix] Looking up realm "<a href="http://example.com" target="_blank">example.com</a>" for User-Name = "<a href="mailto:TEST01@example.com" target="_blank">TEST01@example.com</a>"</div>
<div>Thu Mar 7 13:38:28 2013 : Info: [suffix] No such realm "<a href="http://example.com" target="_blank">example.com</a>"</div>
<div>Thu Mar 7 13:38:28 2013 : Info: ++[suffix] returns noop</div><div>Thu Mar 7 13:38:28 2013 : Info: [ntdomain] No '\' in User-Name = "<a href="mailto:TEST01@example.com" target="_blank">TEST01@example.com</a>", looking up realm NULL</div>
<div>Thu Mar 7 13:38:28 2013 : Info: [ntdomain] No such realm "NULL"</div><div>Thu Mar 7 13:38:28 2013 : Info: ++[ntdomain] returns noop</div><div>Thu Mar 7 13:38:28 2013 : Info: [eap] EAP packet type response id 0 length 23</div>
<div>Thu Mar 7 13:38:28 2013 : Info: [eap] No EAP Start, assuming it's an on-going EAP conversation</div><div>Thu Mar 7 13:38:28 2013 : Info: ++[eap] returns updated</div><div>Thu Mar 7 13:38:28 2013 : Info: [exec_auth] <span style="white-space:pre-wrap"> </span>expand: %{User-Name} -> <a href="mailto:TEST01@example.com" target="_blank">TEST01@example.com</a></div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program output: Proxy-To-Realm = .</div><div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program-Wait: value-pairs: Proxy-To-Realm = .</div><div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program: returned: 0</div>
<div>Thu Mar 7 13:38:29 2013 : Info: ++[exec_auth] returns ok</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[pap] returns noop</div><div>Thu Mar 7 13:38:29 2013 : Info: # Executing section pre-proxy from file /ramfs/radius/etc/raddb/sites-enabled/default</div>
<div>Thu Mar 7 13:38:29 2013 : Info: +- entering group pre-proxy {...}</div><div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program output: NAS-IP-Address := 10.0.7.71, Called-Station-Id := 00-10-F3-28-12-BC, NAS-Port := 0, Service-Type := 1, WISPr-Logoff-URL := <a href="http://logout" target="_blank">http://logout</a></div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program-Wait: value-pairs: NAS-IP-Address := 10.0.7.71, Called-Station-Id := 00-10-F3-28-12-BC, NAS-Port := 0, Service-Type := 1, WISPr-Logoff-URL := <a href="http://logout" target="_blank">http://logout</a></div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program: returned: 0</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[exec_proxy_auth] returns ok</div><div>Thu Mar 7 13:38:29 2013 : Info: [attr_filter.pre-proxy] <span style="white-space:pre-wrap"> </span>expand: %{Realm} -> .</div>
<div>Thu Mar 7 13:38:29 2013 : Debug: attr_filter: Matched entry DEFAULT at line 1</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[attr_filter.pre-proxy] returns updated</div><div>Thu Mar 7 13:38:29 2013 : Info: Proxying request 0 to home server 10.0.7.70 port 1812</div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Going to the next request</div><div>Thu Mar 7 13:38:29 2013 : Debug: Thread 32 waiting to be assigned a request</div><div>Thu Mar 7 13:38:29 2013 : Debug: Waking up in 0.9 seconds.</div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Thread 31 got semaphore</div><div>Thu Mar 7 13:38:29 2013 : Debug: Thread 31 handling request 0, (1 handled so far)</div><div>Thu Mar 7 13:38:29 2013 : Info: [<thread>] # Executing section post-proxy from file /ramfs/radius/etc/raddb/sites-enabled/default</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [<thread>] +- entering group post-proxy {...}</div><div>Thu Mar 7 13:38:29 2013 : Info: [eap] No pre-existing handler found</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[eap] returns noop</div>
<div>Thu Mar 7 13:38:29 2013 : Info: ++? if ("%{proxy-reply:Packet-Type}" == "Access-Challenge")</div><div>Thu Mar 7 13:38:29 2013 : Info: <span style="white-space:pre-wrap"> </span>expand: %{proxy-reply:Packet-Type} -> Access-Challenge</div>
<div>Thu Mar 7 13:38:29 2013 : Info: ? Evaluating ("%{proxy-reply:Packet-Type}" == "Access-Challenge") -> TRUE</div><div>Thu Mar 7 13:38:29 2013 : Info: ++? if ("%{proxy-reply:Packet-Type}" == "Access-Challenge") -> TRUE</div>
<div>Thu Mar 7 13:38:29 2013 : Info: ++- entering if ("%{proxy-reply:Packet-Type}" == "Access-Challenge") {...}</div><div>Thu Mar 7 13:38:29 2013 : Info: [attr_filter.access_challenge] <span style="white-space:pre-wrap"> </span>expand: %{User-Name} -> <a href="mailto:TEST01@example.com" target="_blank">TEST01@example.com</a></div>
<div>Thu Mar 7 13:38:29 2013 : Debug: attr_filter: Matched entry DEFAULT at line 1</div><div>Thu Mar 7 13:38:29 2013 : Info: +++[attr_filter.access_challenge] returns updated</div><div>Thu Mar 7 13:38:29 2013 : Info: ++- if ("%{proxy-reply:Packet-Type}" == "Access-Challenge") returns updated</div>
<div>Thu Mar 7 13:38:29 2013 : Info: Finished request 0.</div><div>Thu Mar 7 13:38:29 2013 : Debug: Going to the next request</div><div>Thu Mar 7 13:38:29 2013 : Debug: Thread 31 waiting to be assigned a request</div>
<div>
Thu Mar 7 13:38:29 2013 : Debug: Threads: deleting 1 spare out of 1 spares</div><div>Thu Mar 7 13:38:29 2013 : Debug: Waking up in 0.9 seconds.</div><div>Thu Mar 7 13:38:29 2013 : Debug: Thread 29 got semaphore</div><div>
Thu Mar 7 13:38:29 2013 : Debug: Thread 29 handling request 1, (1 handled so far)</div><div>Thu Mar 7 13:38:29 2013 : Debug: Thread 28 got semaphore</div><div>Thu Mar 7 13:38:29 2013 : Debug: Thread 28 waiting to be assigned a request</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [<thread>] # Executing section authorize from file /ramfs/radius/etc/raddb/sites-enabled/default</div><div>Thu Mar 7 13:38:29 2013 : Info: [<thread>] +- entering group authorize {...}</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [detail_log] <span style="white-space:pre-wrap"> </span>expand: /ramfs/radius/var/log/radius/radius.log1 -> /ramfs/radius/var/log/radius/radius.log1</div><div>Thu Mar 7 13:38:29 2013 : Info: [detail_log] /ramfs/radius/var/log/radius/radius.log1 expands to /ramfs/radius/var/log/radius/radius.log1</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [detail_log] <span style="white-space:pre-wrap"> </span>expand: %t <span style="white-space:pre-wrap"> </span>Src-IP-Address = %{Packet-Src-IP-Address} -> Thu Mar 7 13:38:29 2013 <span style="white-space:pre-wrap"> </span>Src-IP-Address = 192.168.1.93</div>
<div>Thu Mar 7 13:38:29 2013 : Info: ++[detail_log] returns ok</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[preprocess] returns ok</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[chap] returns noop</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[mschap] returns noop</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [suffix] Looking up realm "<a href="http://example.com" target="_blank">example.com</a>" for User-Name = "<a href="mailto:TEST01@example.com" target="_blank">TEST01@example.com</a>"</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [suffix] No such realm "<a href="http://example.com" target="_blank">example.com</a>"</div>
<div>Thu Mar 7 13:38:29 2013 : Info: ++[suffix] returns noop</div><div>Thu Mar 7 13:38:29 2013 : Info: [ntdomain] No '\' in User-Name = "<a href="mailto:TEST01@example.com" target="_blank">TEST01@example.com</a>", looking up realm NULL</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [ntdomain] No such realm "NULL"</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[ntdomain] returns noop</div><div>Thu Mar 7 13:38:29 2013 : Info: [eap] EAP packet type response id 1 length 22</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [eap] No EAP Start, assuming it's an on-going EAP conversation</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[eap] returns updated</div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_auth] <span style="white-space:pre-wrap"> </span>expand: %{User-Name} -> <a href="mailto:TEST01@example.com" target="_blank">TEST01@example.com</a></div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program output: Proxy-To-Realm = .</div><div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program-Wait: value-pairs: Proxy-To-Realm = .</div><div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program: returned: 0</div>
<div>Thu Mar 7 13:38:29 2013 : Info: ++[exec_auth] returns ok</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[pap] returns noop</div><div>Thu Mar 7 13:38:29 2013 : Info: # Executing section pre-proxy from file /ramfs/radius/etc/raddb/sites-enabled/default</div>
<div>Thu Mar 7 13:38:29 2013 : Info: +- entering group pre-proxy {...}</div><div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program output: NAS-IP-Address := 10.0.7.71, Called-Station-Id := 00-10-F3-28-12-BC, NAS-Port := 0, Service-Type := 1, WISPr-Logoff-URL := <a href="http://logout" target="_blank">http://logout</a></div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program-Wait: value-pairs: NAS-IP-Address := 10.0.7.71, Called-Station-Id := 00-10-F3-28-12-BC, NAS-Port := 0, Service-Type := 1, WISPr-Logoff-URL := <a href="http://logout" target="_blank">http://logout</a></div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program: returned: 0</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[exec_proxy_auth] returns ok</div><div>Thu Mar 7 13:38:29 2013 : Info: [attr_filter.pre-proxy] <span style="white-space:pre-wrap"> </span>expand: %{Realm} -> .</div>
<div>Thu Mar 7 13:38:29 2013 : Debug: attr_filter: Matched entry DEFAULT at line 1</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[attr_filter.pre-proxy] returns updated</div><div>Thu Mar 7 13:38:29 2013 : Debug: Going to the next request</div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Thread 29 waiting to be assigned a request</div><div>Thu Mar 7 13:38:29 2013 : Debug: Waking up in 0.9 seconds.</div><div>Thu Mar 7 13:38:29 2013 : Debug: Thread 27 got semaphore</div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Thread 27 handling request 1, (1 handled so far)</div><div>Thu Mar 7 13:38:29 2013 : Info: [<thread>] # Executing section post-proxy from file /ramfs/radius/etc/raddb/sites-enabled/default</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [<thread>] +- entering group post-proxy {...}</div><div>Thu Mar 7 13:38:29 2013 : Info: [eap] No pre-existing handler found</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[eap] returns noop</div>
<div>Thu Mar 7 13:38:29 2013 : Info: ++? if ("%{proxy-reply:Packet-Type}" == "Access-Challenge")</div><div>Thu Mar 7 13:38:29 2013 : Info: <span style="white-space:pre-wrap"> </span>expand: %{proxy-reply:Packet-Type} -> Access-Accept</div>
<div>Thu Mar 7 13:38:29 2013 : Info: ? Evaluating ("%{proxy-reply:Packet-Type}" == "Access-Challenge") -> FALSE</div><div>Thu Mar 7 13:38:29 2013 : Info: ++? if ("%{proxy-reply:Packet-Type}" == "Access-Challenge") -> FALSE</div>
<div>Thu Mar 7 13:38:29 2013 : Info: Found Auth-Type = EAP</div><div>Thu Mar 7 13:38:29 2013 : Info: Found Auth-Type = Accept</div><div>Thu Mar 7 13:38:29 2013 : Error: Warning: Found 2 auth-types on request for user '<a href="mailto:TEST01@example.com" target="_blank">TEST01@example.com</a>'</div>
<div>Thu Mar 7 13:38:29 2013 : Info: Auth-Type = Accept, accepting the user</div><div>Thu Mar 7 13:38:29 2013 : Auth: Login OK: [<a href="http://TEST01@example.com/" target="_blank">TEST01@example.com/</a><via Auth-Type = EAP>] (from client <a href="http://192.168.0.0/16" target="_blank">192.168.0.0/16</a> port 0 cli 00-19-81-11-07-45)</div>
<div>Thu Mar 7 13:38:29 2013 : Info: # Executing section post-auth from file /ramfs/radius/etc/raddb/sites-enabled/default</div><div>Thu Mar 7 13:38:29 2013 : Info: +- entering group post-auth {...}</div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:User-Name} -> <a href="mailto:TEST01@example.com" target="_blank">TEST01@example.com</a></div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{%{reply:User-Name}:-%{User-Name}} -> <a href="mailto:TEST01@example.com" target="_blank">TEST01@example.com</a></div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{NAS-IP-Address} -> 192.168.1.93</div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{check:Post-Auth-Type} -> </div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:Session-Timeout} -> 1200</div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:Idle-Timeout} -> 30</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:Acct-Interim-Interval} -> </div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:Acct-Session-ID} -> </div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:ZVendor-Byte-Amount-4GB},%{reply:ZVendor-Byte-Amount} -> ,</div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:ZVendor-MaxByteIn-4GB},%{reply:ZVendor-MaxByteIn} -> ,</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:ZVendor-MaxByteOut-4GB},%{reply:ZVendor-MaxByteOut} -> ,</div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:Class[*]} -> </div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:WISPr-Bandwidth-Min-Up} -> </div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>... expanding second conditional</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:WISPr-Bandwidth-Max-Up} -> </div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>... expanding second conditional</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{%{reply:WISPr-Bandwidth-Min-Up}:-0}:%{%{reply:WISPr-Bandwidth-Max-Up}:-0} -> 0:0</div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:WISPr-Bandwidth-Min-Down} -> </div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>... expanding second conditional</div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:WISPr-Bandwidth-Max-Down} -> </div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>... expanding second conditional</div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{%{reply:WISPr-Bandwidth-Min-Down}:-0}:%{%{reply:WISPr-Bandwidth-Max-Down}:-0} -> 0:0</div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:WISPr-Redirection-URL} -> </div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:WISPr-Session-Trerminate-Time} -> </div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:WISPr-Session-Terminate-End-Of-Day} -> </div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:WISPr-Billing-Class-Of-Service} -> </div>
<div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:ZVendor-Group} -> </div><div>Thu Mar 7 13:38:29 2013 : Info: [exec_reply] <span style="white-space:pre-wrap"> </span>expand: %{reply:Chargeable-User-Identity} -> </div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program output: Session-Timeout := 1200, Idle-Timeout := 30, Acct-Interim-Interval := 300, WISPr-Bandwidth-Min-Up := 0, WISPr-Bandwidth-Max-Up := 0, WISPr-Bandwidth-Min-Down := 0, WISPr-Bandwidth-Max-Down := 0</div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program-Wait: value-pairs: Session-Timeout := 1200, Idle-Timeout := 30, Acct-Interim-Interval := 300, WISPr-Bandwidth-Min-Up := 0, WISPr-Bandwidth-Max-Up := 0, WISPr-Bandwidth-Min-Down := 0, WISPr-Bandwidth-Max-Down := 0</div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Exec-Program: returned: 0</div><div>Thu Mar 7 13:38:29 2013 : Info: ++[exec_reply] returns ok</div><div>Thu Mar 7 13:38:29 2013 : Info: Finished request 1.</div><div>Thu Mar 7 13:38:29 2013 : Debug: Going to the next request</div>
<div>Thu Mar 7 13:38:29 2013 : Debug: Thread 27 waiting to be assigned a request</div><div>Thu Mar 7 13:38:30 2013 : Debug: Waking up in 0.9 seconds.</div><div>Thu Mar 7 13:38:31 2013 : Info: Cleaning up request 0 ID 0 with timestamp +24</div>
<div>Thu Mar 7 13:38:31 2013 : Info: Cleaning up request 1 ID 1 with timestamp +25</div><div>Thu Mar 7 13:38:31 2013 : Info: Ready to process requests.</div></div><div class="HOEnZb"><div class="h5"><div><br></div><div>
<br><div class="gmail_quote">On Wed, Mar 6, 2013 at 10:08 PM, Alan DeKok <span dir="ltr"><<a href="mailto:aland@deployingradius.com" target="_blank">aland@deployingradius.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>kao quadrantx wrote:<br>
> I try to test with the latest version of freeradius in git 2.x.x and<br>
> still get the same behavior.<br>
<br>
</div>$ git pull<br>
<br>
Then rebuild.<br>
<div><br>
> Seems the envp variable in radius_exec_program function (exec.c) not clean?<br>
<br>
</div> No. It looks like the userparse() function isn't cleaning up properly<br>
on error.<br>
<br>
i.e. your script is writing *invalid* attributes to its output.<br>
However... only *some* of them are invalid. The server is parsing the<br>
valid ones, and then stopping when it receives the invalid ones. But...<br>
it doesn't free the valid ones, even though it doesn't use them.<br>
<br>
The solution (other than the bug fix I just committed), is to ensure<br>
that your external script returns *valid* attributes.<br>
<br>
If you look at radiusd.log, you'll probably see tons of:<br>
<br>
Exec-Program-Wait: ...: unparsable reply<br>
<br>
This indicates that your script is broken. But it shouldn't cause<br>
issues for the server.<br>
<span><font color="#888888"><br>
Alan DeKok.<br>
</font></span><div><div>-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>