Module: sip-router Branch: 4.0 Commit: 11f031d4570c124fbb01a01b6c7ce0757e032a84 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=11f031d4...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Sun Apr 14 10:11:29 2013 +0200
auth: skip processing of PRACK in consume_credentials()
- report and patch suggestions by Jorj Bauer (cherry picked from commit 2a77ed2bdc9341ecf7d7200e420a1f49e4e9b6ab)
---
modules/auth/auth_mod.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/auth/auth_mod.c b/modules/auth/auth_mod.c index 861f92f..cdfe459 100644 --- a/modules/auth/auth_mod.c +++ b/modules/auth/auth_mod.c @@ -397,16 +397,16 @@ int consume_credentials(struct sip_msg* msg) { struct hdr_field* h; int len; - + + /* skip requests that can't be authenticated */ + if (msg->REQ_METHOD & (METHOD_ACK|METHOD_CANCEL|METHOD_PRACK)) + return -1; get_authorized_cred(msg->authorization, &h); if (!h) { get_authorized_cred(msg->proxy_auth, &h); if (!h) { - if (msg->REQ_METHOD != METHOD_ACK - && msg->REQ_METHOD != METHOD_CANCEL) { - LOG(L_ERR, "auth:consume_credentials: No authorized " + LOG(L_ERR, "auth:consume_credentials: No authorized " "credentials found (error in scripts)\n"); - } return -1; } }