[sr-dev] git:3.1: auth_radius(s): use the update pre_auth

Daniel-Constantin Mierla miconda at gmail.com
Tue Sep 13 23:15:14 CEST 2011


Module: sip-router
Branch: 3.1
Commit: 7c9a316c78c670889ee55772a5d2e8e72a6808d3
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7c9a316c78c670889ee55772a5d2e8e72a6808d3

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Mon Aug 22 11:45:38 2011 +0200

auth_radius(s): use the update pre_auth

Handle the new pre_auth returns.
(cherry picked from commit 01a0bfd830a4efb5e2f8d26fbaf80297eb5a1ba3)

---

 modules_s/auth_radius/authorize.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/modules_s/auth_radius/authorize.c b/modules_s/auth_radius/authorize.c
index 45809c7..0027e3c 100644
--- a/modules_s/auth_radius/authorize.c
+++ b/modules_s/auth_radius/authorize.c
@@ -173,6 +173,17 @@ static inline int authenticate(struct sip_msg* msg, str* realm,
 #ifdef EXTRA_DEBUG
 		abort();
 #endif
+	case NONCE_REUSED:
+		LM_DBG("nonce reused");
+		ret = AUTH_NONCE_REUSED;
+		goto end;
+	case STALE_NONCE:
+		LM_DBG("stale nonce\n");
+		ret = AUTH_STALE_NONCE;
+		goto end;
+	case NO_CREDENTIALS:
+		LM_DBG("no credentials\n");
+		ret = AUTH_NO_CREDENTIALS;
 	case ERROR:
 	case BAD_CREDENTIALS:
 	    ret = -3;




More information about the sr-dev mailing list