TT#34850 Remove already applied upstream patches and refresh old ones

Change-Id: Ief8c453141475957d0cf24d4bf48be6186150da5
changes/23/21323/1
Marco Capetta 7 years ago
parent 2b360f9ea9
commit 6a1804cd6a

@ -1,8 +1,4 @@
##
# upstream fixes
# 4.4
upstream/0001-lcr-fixed-checking-if-there-is-more-uris-available-f.patch
upstream/0002-tmx-allocate-space-to-store-ending-0-for-branch-valu.patch
# upsream fixes from master
upstream/pv-new-function-pv_evalx-dst-fmt.patch
upstream/pv_trans_cfg_line.patch
@ -51,7 +47,6 @@ sipwise/tm-deep-cloning-of-the-request-for-fake-environment.patch
sipwise/core-parser-reset_path_vector-remove-check-for-msg-m.patch
sipwise/pv_trans_eval_uri.patch
sipwise/rtpengine-mos-stats.patch
sipwise/openssl-pthreads-cleanup.patch
sipwise/presence_dfks.patch
sipwise/presence_dfks_add_crlf_xml.patch
sipwise/cfgt_debug.patch

@ -1,38 +0,0 @@
Description: Explicitly call OPENSSL_cleanup() on TLS module destruction
Kamailio is a threaded program, and it pulls OpenSSL via a dynamically
linked plugin loaded at run-time via dlopen().
.
Older OpenSSL releases do not perform automatic cleanup on exit, newer ones
do via an atexit() handler.
.
In addition the OpenSSL code leaks (on purpose) a DSO handler for itself so
that it can guarantee that the library is still present when the atexit()
handler is executed.
.
When the handler is called, a pthread variable is still present but the
memory it points to is not allocated anymore, which indicates something else
released those pthread memory pools. Most probably pthreads itself as part
of its deconstructors, pthread_exit() or atexit() handlers while unwinding
or being unloaded.
.
Explicitly calling the OpenSSL cleanup code fixes the issue for newer
OpenSSL releases, where this has been made visible. And the documentation
for OPENSSL_cleanup() mentions that explicit cleanup might be needed in
these conditions anyway.
Origin: other, Sipwise
Author: Guillem Jover <gjover@sipwise.com>
Bug-Debian: https://bugs.debian.org/870018
---
--- a/modules/tls/tls_init.c
+++ b/modules/tls/tls_init.c
@@ -778,4 +778,8 @@ void destroy_tls_h(void)
tls_destroy_cfg();
tls_destroy_locks();
tls_ct_wq_destroy();
+
+#if OPENSSL_VERSION_NUMBER >= 0x010100000L
+ OPENSSL_cleanup();
+#endif
}

@ -1,31 +0,0 @@
From 1b3e22dcb12d650e08316c28382dc224e9b75148 Mon Sep 17 00:00:00 2001
From: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon, 12 Feb 2018 08:50:54 +0100
Subject: [PATCH] lcr: fixed checking if there is more uris available for
next_gw
- manual backport for 732a3153a0a41d5f951fff85de607f0b46ae73da
(cherry picked from commit 43c9ad6f4dc2e20dd40a2d3dfa6b03f3dd79e3d4)
---
modules/lcr/lcr_mod.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c
index a90fb89..91a3f40 100644
--- a/modules/lcr/lcr_mod.c
+++ b/modules/lcr/lcr_mod.c
@@ -2460,8 +2460,8 @@ static int next_gw(struct sip_msg* _m, char* _s1, char* _s2)
* Take Request-URI user from ruri_user_avp and generate Request
* and Destination URIs. */
- if (!generate_uris(_m, r_uri, &(ruri_user_val.s), &r_uri_len, dst_uri,
- &dst_uri_len, &addr, &gw_index, &flags, &tag_str)) {
+ if (generate_uris(_m, r_uri, &(ruri_user_val.s), &r_uri_len, dst_uri,
+ &dst_uri_len, &addr, &gw_index, &flags, &tag_str) <= 0) {
return -1;
}
}
--
2.7.4

@ -1,28 +0,0 @@
From 5cd6530e68ef311a59acbec180588a498f2a32dc Mon Sep 17 00:00:00 2001
From: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sat, 10 Feb 2018 22:05:42 +0100
Subject: [PATCH] tmx: allocate space to store ending 0 for branch value
- reported by Alfred Farrugia and Sandro Gauci
(cherry picked from commit e1d8008a09d9390ebaf698abe8909e10dfec4097)
---
src/modules/tmx/tmx_pretran.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/tmx/tmx_pretran.c b/modules/tmx/tmx_pretran.c
index 494bdff..67c4f7f 100644
--- a/modules/tmx/tmx_pretran.c
+++ b/modules/tmx/tmx_pretran.c
@@ -260,7 +260,7 @@ int tmx_check_pretran(sip_msg_t *msg)
if(likely(vbr!=NULL)) {
svbranch = vbr->value;
trim(&svbranch);
- dsize += svbranch.len;
+ dsize += svbranch.len + 1;
}
if(dsize<256) dsize = 256;
--
2.7.4
Loading…
Cancel
Save