Module: sip-router
Branch: tma0/iptrtpproxy-v2
Commit: e0fe362a5c661714bc7b2f16f8f6c6ba1857914e
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e0fe362…
Author: root <root(a)hp07.iptel.org>
Committer: root <root(a)hp07.iptel.org>
Date: Thu Mar 3 12:36:19 2011 +0100
- taken changes from modules_k (missing pre_auth enums handled in switch)
---
modules_s/auth_db/authorize.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/modules_s/auth_db/authorize.c b/modules_s/auth_db/authorize.c
index da1d6b4..0668dae 100644
--- a/modules_s/auth_db/authorize.c
+++ b/modules_s/auth_db/authorize.c
@@ -332,6 +332,18 @@ static inline int authenticate(struct sip_msg* msg, str* realm,
authdb_table_inf
ret = -1;
switch(auth_api.pre_auth(msg, realm, hftype, &h, NULL)) {
+ 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;
+ goto end;
case ERROR:
case BAD_CREDENTIALS:
ret = -3;