diff --git a/debian/patches/series b/debian/patches/series index a221562ba..b997974a6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,6 +5,15 @@ upstream/0004-Makefile.defs-compiler-optimization-level-made-varia.patch upstream/0005-core-fixed-several-clang-compiler-warnings.patch upstream/0006-usrloc-proper-index-for-domain-column-when-laoding-e.patch upstream/0007-tm-safety-checks-inside-t_next_contacts.patch +upstream/0008-registrar-handle-error-case-when-deleting-contact-fa.patch +upstream/0009-usrloc-avoid-double-locking-when-preloading-attribut.patch +upstream/0010-core-safety-check-for-double-free-in-q_malloc-as-in-.patch +upstream/0011-avpops-create-a-local-pv-structure-when-parameter-is.patch +upstream/0012-tm-reset-temporary-linking-of-reply-to-transaction-a.patch +upstream/0013-snmpstats-fixe-MIB-file-definitions.patch +upstream/0014-db_flatstore-update-timestamp-for-kamailio-specific-.patch +upstream/0015-modules-pv-fixed-params-and-param-transformation.patch +upstream/0016-modules-pua-added-some-missing-lock-releases.patch upstream/debug/0001-modules-debugger-trace-msg-out.patch no_lib64_on_64_bits.patch no_INSTALL_file.patch diff --git a/debian/patches/upstream/0010-core-safety-check-for-double-free-in-q_malloc-as-in-.patch b/debian/patches/upstream/0010-core-safety-check-for-double-free-in-q_malloc-as-in-.patch new file mode 100644 index 000000000..e6c94284e --- /dev/null +++ b/debian/patches/upstream/0010-core-safety-check-for-double-free-in-q_malloc-as-in-.patch @@ -0,0 +1,30 @@ +From eaeb74f5b6af5be13f88de93729998f13e9a06b7 Mon Sep 17 00:00:00 2001 +From: Daniel-Constantin Mierla +Date: Wed, 11 Dec 2013 09:49:52 +0100 +Subject: [PATCH] core: safety check for double free in q_malloc as in f_malloc + +(cherry picked from commit 943a5941f5ab479803fb30e19e9fa607f0f0fe14) +--- + mem/q_malloc.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/mem/q_malloc.c b/mem/q_malloc.c +index 50acab9..8c36d03 100644 +--- a/mem/q_malloc.c ++++ b/mem/q_malloc.c +@@ -473,6 +473,12 @@ void qm_free(struct qm_block* qm, void* p) + MDBG("qm_free: freeing frag. %p alloc'ed from %s: %s(%ld)\n", + f, f->file, f->func, f->line); + #endif ++ if (unlikely(f->u.is_free)){ ++ LM_INFO("freeing a free fragment (%p/%p) - ignore\n", ++ f, p); ++ return; ++ } ++ + size=f->size; + qm->used-=size; + qm->real_used-=size; +-- +1.8.5.2 + diff --git a/debian/patches/upstream/0011-avpops-create-a-local-pv-structure-when-parameter-is.patch b/debian/patches/upstream/0011-avpops-create-a-local-pv-structure-when-parameter-is.patch new file mode 100644 index 000000000..4b83f594a --- /dev/null +++ b/debian/patches/upstream/0011-avpops-create-a-local-pv-structure-when-parameter-is.patch @@ -0,0 +1,36 @@ +From e96a8b80fd253777e1d001ad778c5a62473ba010 Mon Sep 17 00:00:00 2001 +From: Daniel-Constantin Mierla +Date: Wed, 11 Dec 2013 23:01:41 +0100 +Subject: [PATCH] avpops: create a local pv structure when parameter is only + flags + +- flags details are stored inside it +- fixes crash at startup reported by Kevin Scott Adams, FS#381 + +(cherry picked from commit 3c88f1de9d647db8a14bae45af1fa3b34f74d4e6) +--- + modules/avpops/avpops_parse.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/modules/avpops/avpops_parse.c b/modules/avpops/avpops_parse.c +index 3a16f18..3a6c5ec 100644 +--- a/modules/avpops/avpops_parse.c ++++ b/modules/avpops/avpops_parse.c +@@ -129,6 +129,14 @@ int parse_avp_db(char *s, struct db_param *dbp, int allow_scheme) + goto error; + } + } ++ /* no pv to lookup, create one to store flags details */ ++ dbp->a.u.sval = (pv_spec_t*)pkg_malloc(sizeof(pv_spec_t)); ++ if(dbp->a.u.sval==NULL) ++ { ++ LM_ERR("no more pkg\n"); ++ goto error; ++ } ++ memset(dbp->a.u.sval, 0, sizeof(pv_spec_t)); + dbp->a.u.sval->pvp.pvn.u.isname.type |= (flags<<8)&0xff00; + dbp->a.type = AVPOPS_VAL_NONE; + } else { +-- +1.8.5.2 + diff --git a/debian/patches/upstream/0012-tm-reset-temporary-linking-of-reply-to-transaction-a.patch b/debian/patches/upstream/0012-tm-reset-temporary-linking-of-reply-to-transaction-a.patch new file mode 100644 index 000000000..c9c1eee60 --- /dev/null +++ b/debian/patches/upstream/0012-tm-reset-temporary-linking-of-reply-to-transaction-a.patch @@ -0,0 +1,74 @@ +From 5b869a7c1c584f2762610c5310e7281375c8103d Mon Sep 17 00:00:00 2001 +From: Daniel-Constantin Mierla +Date: Wed, 11 Dec 2013 23:58:11 +0100 +Subject: [PATCH] tm: reset temporary linking of reply to transaction after + branch failure route execution + +- reported by Robert Boisvert, FS#379 + +(cherry picked from commit 0ebc983a422cd5ee4baa39bb3ef3bdbeeefd4571) +--- + modules/tm/t_reply.c | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c +index 562b583..4d9901d 100644 +--- a/modules/tm/t_reply.c ++++ b/modules/tm/t_reply.c +@@ -1093,7 +1093,7 @@ int run_branch_failure_handlers(struct cell *t, struct sip_msg *rpl, + + /* failure_route for a local UAC? */ + if (!shmem_msg) { +- LOG(L_WARN,"Warning: run_branch_failure_handlers: no UAC support (%d, %d) \n", ++ LOG(L_WARN,"no UAC support (%d, %d) \n", + on_branch_failure, t->tmcb_hl.reg_types); + return 0; + } +@@ -1101,13 +1101,13 @@ int run_branch_failure_handlers(struct cell *t, struct sip_msg *rpl, + /* don't start faking anything if we don't have to */ + if (unlikely((on_branch_failure < 0) && !has_tran_tmcbs( t, TMCB_ON_BRANCH_FAILURE))) { + LOG(L_WARN, +- "Warning: run_failure_handlers: no branch_failure handler (%d, %d)\n", ++ "no branch_failure handler (%d, %d)\n", + on_branch_failure, t->tmcb_hl.reg_types); + return 1; + } + + if (!fake_req(&faked_req, shmem_msg, extra_flags, &t->uac[picked_branch])) { +- LOG(L_ERR, "ERROR: run_branch_failure_handlers: fake_req failed\n"); ++ LOG(L_ERR, "fake_req failed\n"); + return 0; + } + /* fake also the env. conforming to the fake msg */ +@@ -1124,7 +1124,7 @@ int run_branch_failure_handlers(struct cell *t, struct sip_msg *rpl, + if (exec_pre_script_cb(&faked_req, BRANCH_FAILURE_CB_TYPE)>0) { + /* run a branch_failure_route action if some was marked */ + if (run_top_route(event_rt.rlist[on_branch_failure], &faked_req, 0)<0) +- LOG(L_ERR, "ERROR: run_branch_failure_handlers: Error in run_top_route\n"); ++ LOG(L_ERR, "error in run_top_route\n"); + exec_post_script_cb(&faked_req, BRANCH_FAILURE_CB_TYPE); + } + /* update message flags, if changed in branch_failure route */ +@@ -1357,9 +1357,9 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code, + /* also append the current reply to the transaction to + * make it available in failure routes - a kind of "fake" + * save of the final reply per branch */ +- Trans->uac[branch].reply = reply; + if (unlikely(has_tran_tmcbs( Trans, TMCB_ON_BRANCH_FAILURE_RO|TMCB_ON_BRANCH_FAILURE) +- || (Trans->uac[picked_branch].on_branch_failure) )) { ++ || (Trans->uac[branch].on_branch_failure) )) { ++ Trans->uac[branch].reply = reply; + extra_flags= + ((Trans->uac[branch].request.flags & F_RB_TIMEOUT)? + FL_TIMEOUT:0) | +@@ -1369,6 +1369,7 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code, + picked_branch = branch; + run_branch_failure_handlers( Trans, Trans->uac[branch].reply, + new_code, extra_flags); ++ Trans->uac[branch].reply = 0; + } + + +-- +1.8.5.2 + diff --git a/debian/patches/upstream/0013-snmpstats-fixe-MIB-file-definitions.patch b/debian/patches/upstream/0013-snmpstats-fixe-MIB-file-definitions.patch new file mode 100644 index 000000000..ab7fc1c4b --- /dev/null +++ b/debian/patches/upstream/0013-snmpstats-fixe-MIB-file-definitions.patch @@ -0,0 +1,45 @@ +From 98ecf7d2c5753357fd2c1d1e8e72f425e4d48f9b Mon Sep 17 00:00:00 2001 +From: Daniel-Constantin Mierla +Date: Thu, 12 Dec 2013 15:50:27 +0100 +Subject: [PATCH] snmpstats: fixe MIB file definitions + +- patch by takeshi, FS#363 + +(cherry picked from commit ab75785aa707f10fdbccfb0531a0f35e820f5ebc) +--- + modules/snmpstats/mibs/KAMAILIO-TC | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/modules/snmpstats/mibs/KAMAILIO-TC b/modules/snmpstats/mibs/KAMAILIO-TC +index 81d1459..171c491 100644 +--- a/modules/snmpstats/mibs/KAMAILIO-TC ++++ b/modules/snmpstats/mibs/KAMAILIO-TC +@@ -62,7 +62,7 @@ KamailioSIPTransportProtocol ::= TEXTUAL-CONVENTION + tcp(2), + sctp(3), + tls(4), +- sctp_tls(5), ++ sctptls(5), + ws(6), + wss(7) + } +@@ -79,14 +79,13 @@ KamailioSIPEntityRole ::= TEXTUAL-CONVENTION + operation of a SIP outbound edge proxy node. + Kamailio adds the role 'sipcaptureServer' for + operation of a Homer SIPcapture node." +- " + SYNTAX BITS { + other(0), + userAgent(1), + proxyServer(2), + redirectServer(3), +- registrarServer(4) +- edgeproxyServer(5) ++ registrarServer(4), ++ edgeproxyServer(5), + sipcaptureServer(6) + } + +-- +1.8.5.2 + diff --git a/debian/patches/upstream/0014-db_flatstore-update-timestamp-for-kamailio-specific-.patch b/debian/patches/upstream/0014-db_flatstore-update-timestamp-for-kamailio-specific-.patch new file mode 100644 index 000000000..0534e9e3a --- /dev/null +++ b/debian/patches/upstream/0014-db_flatstore-update-timestamp-for-kamailio-specific-.patch @@ -0,0 +1,37 @@ +From d75bc3b69151a9d0391309e6bb51784f3b6b9a83 Mon Sep 17 00:00:00 2001 +From: Daniel-Constantin Mierla +Date: Mon, 16 Dec 2013 09:26:03 +0100 +Subject: [PATCH] db_flatstore: update timestamp for kamailio specific rpc + rotate + +- do also in 'rotate' command, not only in 'k_rotate' +- from a patch by Abdelkader Allam + +(cherry picked from commit b15aefa31e45f1ad6a45b64905f9fae24e0f790e) +--- + modules/db_flatstore/flat_rpc.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules/db_flatstore/flat_rpc.c b/modules/db_flatstore/flat_rpc.c +index 2fe0d0f..5145d83 100644 +--- a/modules/db_flatstore/flat_rpc.c ++++ b/modules/db_flatstore/flat_rpc.c +@@ -32,6 +32,7 @@ + + #include "flat_rpc.h" + #include "flatstore_mod.h" ++#include "km_flatstore_mod.h" + + #include + +@@ -43,6 +44,7 @@ + */ + static void rotate(rpc_t* rpc, void* c) + { ++ *km_flat_rotate = time(0); + *flat_rotate = time(0); + } + +-- +1.8.5.2 + diff --git a/debian/patches/upstream/0015-modules-pv-fixed-params-and-param-transformation.patch b/debian/patches/upstream/0015-modules-pv-fixed-params-and-param-transformation.patch new file mode 100644 index 000000000..64c6af76d --- /dev/null +++ b/debian/patches/upstream/0015-modules-pv-fixed-params-and-param-transformation.patch @@ -0,0 +1,45 @@ +From 9e8c3f90e9467153b1e63a257ccdfb09adc4ecfd Mon Sep 17 00:00:00 2001 +From: Juha Heinanen +Date: Thu, 19 Dec 2013 16:21:25 +0200 +Subject: [PATCH] modules/pv: fixed params and param transformation + +- params need to be taken from sip_params field of sip_uri struct +(cherry picked from commit e54b3ec673cb32664a1e8de2e591190f22216724) +--- + modules/pv/pv_trans.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules/pv/pv_trans.c b/modules/pv/pv_trans.c +index 738efca..7c75deb 100644 +--- a/modules/pv/pv_trans.c ++++ b/modules/pv/pv_trans.c +@@ -1025,7 +1025,7 @@ int tr_eval_uri(struct sip_msg *msg, tr_param_t *tp, int subtype, + val->ri = _tr_parsed_uri.port_no; + break; + case TR_URI_PARAMS: +- val->rs = (_tr_parsed_uri.params.s)?_tr_parsed_uri.params:_tr_empty; ++ val->rs = (_tr_parsed_uri.sip_params.s)?_tr_parsed_uri.sip_params:_tr_empty; + break; + case TR_URI_PARAM: + if(tp==NULL) +@@ -1033,7 +1033,7 @@ int tr_eval_uri(struct sip_msg *msg, tr_param_t *tp, int subtype, + LM_ERR("param invalid parameters\n"); + return -1; + } +- if(_tr_parsed_uri.params.len<=0) ++ if(_tr_parsed_uri.sip_params.len<=0) + { + val->rs = _tr_empty; + val->flags = PV_VAL_STR; +@@ -1043,7 +1043,7 @@ int tr_eval_uri(struct sip_msg *msg, tr_param_t *tp, int subtype, + + if(_tr_uri_params == NULL) + { +- sv = _tr_parsed_uri.params; ++ sv = _tr_parsed_uri.sip_params; + if (parse_params(&sv, CLASS_ANY, &phooks, &_tr_uri_params)<0) + return -1; + } +-- +1.8.5.2 + diff --git a/debian/patches/upstream/0016-modules-pua-added-some-missing-lock-releases.patch b/debian/patches/upstream/0016-modules-pua-added-some-missing-lock-releases.patch new file mode 100644 index 000000000..e710c5dad --- /dev/null +++ b/debian/patches/upstream/0016-modules-pua-added-some-missing-lock-releases.patch @@ -0,0 +1,58 @@ +From a4060da5e1fe1e64c224ff32d669a699a0d5cd1d Mon Sep 17 00:00:00 2001 +From: Juha Heinanen +Date: Thu, 26 Dec 2013 17:51:04 +0200 +Subject: [PATCH] modules/pua: added some missing lock releases (cherry picked + from commit 4eb338611e716e7a32f252acbae52bace6047a0a) + +--- + modules/pua/send_subscribe.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/modules/pua/send_subscribe.c b/modules/pua/send_subscribe.c +index 006bae4..d568ff2 100644 +--- a/modules/pua/send_subscribe.c ++++ b/modules/pua/send_subscribe.c +@@ -1030,8 +1030,12 @@ int send_subscribe(subs_info_t* subs) + insert: + + if (subs->expires == 0) ++ { + /* Don't create a new dialog when expires == 0 */ +- goto done; ++ if (dbmode != PUA_DB_ONLY) ++ lock_release(&HashT->p_records[hash_code].lock); ++ goto done; ++ } + + if(subs->flag & UPDATE_TYPE) + { +@@ -1044,6 +1048,8 @@ insert: + { + LM_ERR("while building callback" + " param\n"); ++ if (dbmode != PUA_DB_ONLY) ++ lock_release(&HashT->p_records[hash_code].lock); + goto error; + } + hentity->flag= flag; +@@ -1068,6 +1074,8 @@ insert: + uac_r.dialog = 0; + } + shm_free(hentity); ++ if (dbmode != PUA_DB_ONLY) ++ lock_release(&HashT->p_records[hash_code].lock); + + /* Although this is an error must not return -1 as the + calling function must continue processing. */ +@@ -1089,6 +1097,8 @@ insert: + if(presentity== NULL) + { + LM_ERR("no more share memory\n"); ++ if (dbmode != PUA_DB_ONLY) ++ lock_release(&HashT->p_records[hash_code].lock); + goto error; + } + memset(presentity, 0, size); +-- +1.8.5.2 +