<font face="arial,helvetica,sans-serif">Hello,<br><br>I am using OpenSIPS with auth_radius module to simulate to radius client with my Diameter/Radius Gateway. With scripting variables I succeeded for a part but I still have some problems. I change some functions to make opensips and my requests fully compliant to RFC 5090.<br>
<br>First, there is some bugs in names. For example, two variables have the same name and one of them was with the wrong number to parse. Here is a propose change:<br>pvar.c<br></font><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
<font face="arial,helvetica,sans-serif"> {{"an", (sizeof("an")-1)}, /* */</font><br><font face="arial,helvetica,sans-serif"> PVT_AUTH_NONCE, pv_get_authattr, 0,</font><br><font face="arial,helvetica,sans-serif"> 0, 0, pv_init_iname, 5},</font><br>
<font face="arial,helvetica,sans-serif"> {{"aR", (sizeof("aR")-1)}, /* */</font><br><font face="arial,helvetica,sans-serif"> PVT_AUTH_RESPONSE, pv_get_authattr, 0,</font><br><font face="arial,helvetica,sans-serif"> 0, 0, pv_init_iname, 6},</font><br clear="all">
</blockquote><br>Second, I changed some functions in aaa_radius because I need high customization (to make it compliant with RFC5090).<br>I changed "proxy_challenge" and I want to give as parameters realm and nonce (nonce must be done on diameter server). I succeeded in making static parameters but if I try this: <br>
<blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">xlog("realm: $var(realm), nonce: $var(nonce)\n");<br>proxy_challenge( "$var(realm)", "$var(nonce)");<br>
</blockquote>In xlog, everything is Ok but in proxy_challenge, I obtain variables as they are, e.g."$var(realm)". It's hard to get into opensips source in just one day but I found that there is a translator in auth_mod.c.<br>
Here is the non controlled.<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"> {"proxy_challenge", (cmd_function)proxy_challenge, 2,<br>
0, 0, REQUEST_ROUTE},<br></blockquote>Obtained values are as I said before.<br><br>If I try, to activate a translator:<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
{"proxy_challenge", (cmd_function)proxy_challenge, 2,<br>
fixup_pvar_pvar, 0, REQUEST_ROUTE},<br></blockquote>It's supposed to work but I obtain "N" for both values.<br><br><br>For information, here is my opensips.cfg:<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
# We are in REGISTER part! <br>$var(method)="REGISTER";<br><br><br>if ($adu == NULL)<br>{<br> radius_send_auth("Frequest","challenge");<br> #Digest-Realm = $var(realm),Digest-Nonce = $var(nonce),Digest-Qop = $var(qop),Digest-Algorithm = $var(algorithm)<br>
<br> xlog("realm: $var(realm), nonce: $var(nonce)\n");<br> <br> proxy_challenge( "$var(realm)", "$var(nonce)");<br> exit;<br>}<br>else<br>{<br> radius_send_auth("request","result");<br>
xlog( "SECOND REQUEST!!!!!!!!!!!!!!!\n");<br>}<br>xlog("**********************************OUT");<br></blockquote><br>I changed all functions after proxy_challenge (like challenge...) to give the nonce, don't ask for qop (always on) and don't manage nonce index as it's not sip server job.<br>
<br><br>I hope I was clear in my questions.<br><br>Thanks<br><br>Best regards,<br>Alexandre Westfahl,<br>Keio University, Yokohama<br>Teraoka Lab.<br>Linux User: #458230<br>PGP: EACE5768<br>