On Sep 24, 2009 at 15:49, inge <[email protected]> wrote: > Hi Andrei, > > Thanks for the 0.9.8 release. > We upgraded our proxy yesterday with sucess. > > But we had another crash of SER in this morning. > The cause seem to be defferent than the previous one. > > Attached is a backtrace from the coredump. > Is there a bug related to that in the last 0.9.x version ?
No, this is a new one. It was introduced in 0.9.7. A very safe looking optimization was backported from unstable (at that time). Unfortunately the optimization had a bug and although it was quickly fixed in unstable, the fix was not backported to 0.9.7. Try the attached patch (patch -p2 < auth_db_empty_usernames_fix.patch ). It seems I'll have to release 0.9.9 :-( Andrei
commit 9b5ceac5bd15a079e1d73ae7fd5e5a398ea5656a Author: Jan Janak <[email protected]> Date: Wed Apr 19 14:48:01 2006 +0000 - fixed bug introduced with SUPPORT_EMPTY_USERNAMES diff --git a/ser/modules/auth_db/authorize.c b/ser/modules/auth_db/authorize.c index cc68bf6..79578a7 100644 --- a/ser/modules/auth_db/authorize.c +++ b/ser/modules/auth_db/authorize.c @@ -65,6 +65,7 @@ static inline int get_ha1(struct username* username, str* realm, #ifndef SUPPORT_EMPTY_AUTHNAME /* sanity check first to avoid unnecessary DB lookup */ if (_username->user.len == 0) { + *res = 0; return 1; } #endif @@ -250,7 +251,7 @@ static inline int authenticate(struct sip_msg* msg, str* realm, char* table, } cred = (auth_body_t*)h->parsed; - + result = 0; res = get_ha1(&cred->digest.username, &domain, _table, ha1, &result); if (res < 0) { /* Error while accessing the database */ @@ -261,7 +262,9 @@ static inline int authenticate(struct sip_msg* msg, str* realm, char* table, } if (res > 0) { /* Username not found in the database */ - auth_dbf.free_result(db_handle, result); + if (result) { + auth_dbf.free_result(db_handle, result); + } return -1; }
_______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
