Hi,
The libradius returns the error via the rc_auth() function.I notices a
bit of an inconsistency in the handling of the retcode of rc_auth() -
old stuff :).
You say you see a REJECT and the RADIUS level, right ?
Could you please try the attached patchand see if the failures are
properly reported to the script.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 06.06.2014 11:27, dpa wrote:
Hello Bogdan
What I can see in logs during test call
"ERROR:aaa_radius:send_auth_func: radius authentication message failed
with ERROR"
*From:*Bogdan-Andrei Iancu [mailto:[email protected]]
*Sent:* Thursday, June 05, 2014 6:20 PM
*To:* dpa; 'OpenSIPS users mailling list'
*Subject:* Re: [OpenSIPS-Users] Opensips 1.10.1 and radius problem
Hi,
-1 ret code means some internal error - check the opensips logs for
any error.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 03.06.2014 07:01, dpa wrote:
Hello Bogdan
Sorry for long answer.
I changed opensips.cfg just a little
....
radius_send_auth("set1","set2");
switch($rc){
case -2:
xlog ("Case -2 in radius route detected");
break;
case -1:
xlog ("Case -1 in radius route detected");
break;
}
diff --git a/modules/aaa_radius/aaa_radius.c b/modules/aaa_radius/aaa_radius.c
index 5e2c856..e1a3c71 100644
--- a/modules/aaa_radius/aaa_radius.c
+++ b/modules/aaa_radius/aaa_radius.c
@@ -329,9 +329,9 @@ int send_auth_func(struct sip_msg* msg, str* s1, str* s2) {
}
res = rc_auth(rh, SIP_PORT, send, &recv, mess);
- if (res!=OK_RC && res!=BADRESP_RC) {
+ if (res!=OK_RC && res!=REJECT_RC) {
LM_ERR("radius authentication message failed with %s\n",
- (res==TIMEOUT_RC)?"TIMEOUT":"ERROR");
+ (res==TIMEOUT_RC)?"TIMEOUT":((res==BADRESP_RC)?"BAD REPLY":"ERROR"));
}else{
LM_DBG("radius authentication message sent\n");
}
@@ -362,7 +362,7 @@ int send_auth_func(struct sip_msg* msg, str* s1, str* s2) {
for(; (vp = rc_avpair_get(vp, attr->value, 0)); vp = vp->next)
extract_avp(vp);
- if ( res!=OK_RC && res!=BADRESP_RC)
+ if ( res!=OK_RC && res!=REJECT_RC)
goto error;
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users