<font face="arial,helvetica,sans-serif">My changes are just hack, it may not be optimized. I will make you an archive today but could you tell me if fixup_pvar_pvar is supposed to do the job correctly? I would like to solve this asap to continue. <br>
<br>Regards,<br>Alexandre.<br></font><br><div class="gmail_quote">On Fri, Jun 4, 2010 at 4:59 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Alexandre,<br>
<br>
Could you please send an unified diff with your changes?<br>
<br>
Regards,<br>
Bogdan<br>
<div><div></div><div class="h5"><br>
Alexandre Westfahl ($B%"%l%C%/%5%s%I%k!!%&%(%9%U%!%k(B) wrote:<br>
> Hello,<br>
><br>
> I am using OpenSIPS with auth_radius module to simulate to radius<br>
> client with my Diameter/Radius Gateway. With scripting variables I<br>
> succeeded for a part but I still have some problems. I change some<br>
> 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<br>
> the same name and one of them was with the wrong number to parse. Here<br>
> is a propose change:<br>
> pvar.c<br>
><br>
> {{"an", (sizeof("an")-1)}, /* */<br>
> PVT_AUTH_NONCE, pv_get_authattr, 0,<br>
> 0, 0, pv_init_iname, 5},<br>
> {{"aR", (sizeof("aR")-1)}, /* */<br>
> PVT_AUTH_RESPONSE, pv_get_authattr, 0,<br>
> 0, 0, pv_init_iname, 6},<br>
><br>
><br>
> Second, I changed some functions in aaa_radius because I need high<br>
> customization (to make it compliant with RFC5090).<br>
> I changed "proxy_challenge" and I want to give as parameters realm and<br>
> nonce (nonce must be done on diameter server). I succeeded in making<br>
> static parameters but if I try this:<br>
><br>
> xlog("realm: $var(realm), nonce: $var(nonce)\n");<br>
> proxy_challenge( "$var(realm)", "$var(nonce)");<br>
><br>
> In xlog, everything is Ok but in proxy_challenge, I obtain variables<br>
> as they are, e.g."$var(realm)". It's hard to get into opensips source<br>
> in just one day but I found that there is a translator in auth_mod.c.<br>
> Here is the non controlled.<br>
><br>
> {"proxy_challenge", (cmd_function)proxy_challenge, 2,<br>
> 0, 0, REQUEST_ROUTE},<br>
><br>
> Obtained values are as I said before.<br>
><br>
> If I try, to activate a translator:<br>
><br>
> {"proxy_challenge", (cmd_function)proxy_challenge, 2,<br>
> fixup_pvar_pvar, 0, REQUEST_ROUTE},<br>
><br>
> It's supposed to work but I obtain "N" for both values.<br>
><br>
><br>
> For information, here is my opensips.cfg:<br>
><br>
> # 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<br>
> = $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>
><br>
><br>
> I changed all functions after proxy_challenge (like challenge...) to<br>
> give the nonce, don't ask for qop (always on) and don't manage nonce<br>
> 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>
</div></div>> ------------------------------------------------------------------------<br>
<div class="im">><br>
> _______________________________________________<br>
> Devel mailing list<br>
> <a href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a><br>
><br>
<br>
<br>
</div><font color="#888888">--<br>
Bogdan-Andrei Iancu<br>
<a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a><br>
</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Alexandre Westfahl,<br>Keio University, Yokohama<br>Teraoka Lab.<br>Linux User: #458230<br>PGP: EACE5768<br>