Update upstream source from tag 'upstream/5.7.1'

Update to upstream version '5.7.1'
with Debian dir 5bff692016
mr12.0
Victor Seva 3 years ago
commit 9fc5c3ffb6

@ -1,3 +1,314 @@
===================== 2023-06-28 Version 5.7.1 Released =====================
===================== Changes Since Version 5.7.0 ===========================
commit aaadeb3a1d75a2525ee2e209c3c41cf1b5a0a6ea
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Jun 28 09:37:37 2023 +0200
Makefile.defs: version set to 5.7.1
commit 8e39591a6a2a94c34ab01844d267642acfbb944b
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Jun 28 09:36:40 2023 +0200
pkg: deb specs updated for v5.7.1
commit 39e18a7f38a06cd4d436e05ab3af5ff2b840f090
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Jun 28 09:35:05 2023 +0200
pkg: version set to 5.7.1 for rpms and alpine specs
commit 402bab6f63b515a13a72ac2dad6e40075ded1479
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Fri Jun 23 09:06:43 2023 +0200
utils/kamcmd: fix memory leak
fixes #3478
(cherry picked from commit badc81cb427ba5aaf03ca26e4c2654d58ee08588)
commit 9905c4ffc181f5a3e32bc20965c78542c7f15d12
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Jun 21 14:15:24 2023 +0200
tls: enable locking for rand ctx if libssl version is 3.0+
(cherry picked from commit 81be9e78c3731d45734480285d7afc17f8f9e87a)
commit 2bd813b0c4c1b942ee634eca5e68a025be9fab8e
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jun 22 14:37:18 2023 +0200
http_client: fix depecration of CURLOPT_REDIR_PROTOCOLS
- GH #3492
(cherry picked from commit 4d8263f9be97a541a24cbc6acc9855509640780b)
commit ff0e0d7aafa3905526599e604ff91542529a5b32
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Thu Jun 22 17:29:48 2023 +0200
tls: fix build for openssl < 1.1.1
OPENSSL_INIT_ATFORK was introduced in libssl 1.1.1
error introduced at 9d6bfb96528c49e6aaa39aa47be877ca528c3537
(cherry picked from commit 82f5fcbf88ee3058bd9da520b528c86393cc422a)
commit 23a121e5d8ffa172f71433c2ef74f323a54e8315
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Jun 21 09:27:28 2023 +0200
http_client: fix depecration of CURLOPT_PROTOCOLS and CURLINFO_SIZE_DOWNLOAD
- GH #3484
(cherry picked from commit b7b3c67fc1205d114fadf360a594930ef69835a3)
commit 8cc9ec410ff359e3d93e994c210977a8baa578c4
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Mon Jun 19 20:12:17 2023 +0200
tls: disable tls_rand for openssl >= 3.0
From https://www.openssl.org/docs/man3.0/man3/RAND_set_rand_method.html
> All of the functions described on this page are deprecated.
> Applications should instead use RAND_set_DRBG_type(3), EVP_RAND(3) and
> EVP_RAND(7).
(cherry picked from commit c4b04696a6bfe31fdd65fa56529b0d46f2774067)
commit d4b7333ca126ae7c77ec8f095f8728234d0dfe43
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Mon Jun 19 13:36:53 2023 +0200
tls: disable engine for openssl >= 3.0
From https://www.openssl.org/docs/man3.0/man7/migration_guide.html
> The refactoring to support Providers conflicts internally with the APIs
> used to support engines, including the ENGINE API and any function that
> creates or modifies custom "METHODS"
From https://www.openssl.org/docs/man3.0/man3/ENGINE_init.html:
> All of the functions described on this page are deprecated. Applications
> should instead use the provider APIs.
(cherry picked from commit a0a9373ccb3d3da3a1e9e1335d904fcf013d9ebd)
commit 6669c0befcd69f5d5e196c53188bed58a6a9e1c2
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Jun 13 12:37:21 2023 +0200
tls: OPENSSL_fork_[prepare|parent|child] deprecated at openssl 3.0
From https://www.openssl.org/docs/man3.0/man3/OPENSSL_fork_prepare.html:
> OPENSSL_fork_prepare, OPENSSL_fork_parent, OPENSSL_fork_child have been
> deprecated since OpenSSL 3.0.
>
> These methods are currently unused, and as such, no replacement methods
> are required or planned.
>
> OpenSSL has state that should be reset when a process forks. For
> example, the entropy pool used to generate random numbers (and therefore
> encryption keys) should not be shared across multiple programs. The
> OPENSSL_fork_prepare(), OPENSSL_fork_parent(), and OPENSSL_fork_child()
> functions are used to reset this internal state.
>
> OPENSSL_init_crypto(3) will register these functions with the
> appropriate handler, when the OPENSSL_INIT_ATFORK flag is used
(cherry picked from commit 9d6bfb96528c49e6aaa39aa47be877ca528c3537)
commit f1ebf365e8054fbca260b8574bea502b32435382
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jun 20 09:14:48 2023 +0200
Makefile.groups: added posops to extra group
(cherry picked from commit 87959c23aacf4cfa7ed8acd214f70775939c8a01)
commit 85e3a2bce7ba4d8c6e9c167c732dad11706f99d3
Author: Kaufman <bkaufman@nexvortex.com>
Date: Sun Oct 9 11:14:37 2022 -0400
pkg/docker: submodule update [skip ci]
commit 6005e8e4e3e0d9488693eca1484122dfed303ac6
Author: Sergey Safarov <s.safarov@gmail.com>
Date: Mon Jun 12 22:20:57 2023 +0300
pkg/kamailio/alpine: packaged lwsc
(cherry picked from commit 768dd96da6f52e46bc227d9815f7225b33042295)
commit 3e510ac68a4b9bc99b6ade5cb7cc862adcbb9eb9
Author: Kamailio Dev <kamailio.dev@kamailio.org>
Date: Mon Jun 19 14:17:02 2023 +0200
modules: readme files regenerated - modules ... [skip ci]
commit 8087b2fed765115bf0fd238c0c987fdbb12e1d31
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jun 19 13:18:59 2023 +0200
core: kemi - propagate bool as a return value type
- some scripting languages differentiate bool false|true vs int 0|1 values
(cherry picked from commit f36744cf15c7fcddc7422f97a508cad600ca7d98)
commit 91cb5d0adf887db6a34e2a394ab34aae51f475bf
Author: Ovidiu Sas <osas@voipembedded.com>
Date: Mon Jun 12 12:00:13 2023 -0400
mqueue: fix documentation to match the code
(cherry picked from commit 23d43645332451ec1ec6dab11da777f9c3bfe304)
commit faf7941042c1e00a68f6ac36d14568b35a666dbc
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jun 12 17:16:53 2023 +0200
cdp: check setsockopt() return code
(cherry picked from commit 39f09877e650d66e820ca7eb0d61416818d174fc)
commit a8094a3b0bb73be70500b4cbbfb2e99e00d15243
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jun 12 16:27:46 2023 +0200
auth_diameter: free req in some cases of errors
(cherry picked from commit fb19f0ea4c656afe7b60788efb8804e552fd37f9)
commit 39262e50389d41c50d0e6ff2ae2b0a2521f91640
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jun 12 15:53:38 2023 +0200
dialplan: restructured condition on input and output params
(cherry picked from commit f99b116e876170709ad364ac2b8093969a939d4a)
commit c6af81fad763114c1cec74927787388afffce66d
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jun 12 11:16:51 2023 +0200
Makefile: fixed paths for init.d scripts install on debian and centos
- GH #3476
(cherry picked from commit c285b16bc066ca4236ee00cf3e7fb24539fa9f2b)
commit 4f3c32e48b79688ab905802c173b981f92c54e56
Author: Henning Westerholt <hw@gilawa.com>
Date: Mon Jun 12 08:24:01 2023 +0000
tools: use python3 for route_graph.py tool, for old systems with both python2/python3, fix file closing
(cherry picked from commit 7b1fe0483b684693c7baea9b62b471b64c6e22a9)
commit 14638ef43f9b2ef710ae3a6464fb5db0b9de3377
Author: Akash Gupta <listen2akash@gmail.com>
Date: Sat Jun 10 14:48:03 2023 +0530
tool: port the route_graph.py script to python version 3.x
(cherry picked from commit fa2a69e2ae919b7ba221e87e2001bde83113ce2a)
commit cd665a135e0046b915af7afd9135a2c29a7933df
Author: Ovidiu Sas <osas@voipembedded.com>
Date: Mon Jun 12 00:24:15 2023 -0400
mqueue: fix support for db_text
- db_operations are safe only after db mod_init()
- closes #3474
(cherry picked from commit 848d55388dda0c135820d9f24950561946249bbc)
commit 9c78c0f55dc2aefa53872b26162ddae5b553d66a
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jun 1 13:39:47 2023 +0200
ims_usrloc_scscf: docs - type int for hash_size parameter
(cherry picked from commit 1217c9098bc8790e659959a7df97e441e84b54ff)
commit b68cb1ace4d44ba0a471a9fd9a6138f3738efef4
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed May 31 11:53:14 2023 +0200
async: use _async_timer_exec_last_slot = UINT_MAX for initial value
(cherry picked from commit bc544daea2ee4bb568cf0314f6d32b8aa0c81ecc)
commit febfc9722f83d992a3c1643fa373468b73cb3fa0
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed May 31 09:01:13 2023 +0200
sst: fix condition on sst_min_se for sst_check_min()
(cherry picked from commit a059af04ac47fd31238ca4f22ad868529e035c43)
commit 3b6d0bd508d62b6f6cd0176551311d25225bf63e
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue May 30 17:00:27 2023 +0200
cfgt: reworked test on dest.s for freeing
(cherry picked from commit b2f99145fa7f4088c80dd3e759372445f93f5492)
commit c29d5299650ddabb9a5b61c7b6a72a69a68c5b9e
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon May 29 08:56:19 2023 +0200
cdp: reworked switch for setting x->state = ACC_CC_ST_DISCON
(cherry picked from commit cb6332982edff5fd2f10b6ee41c22388cc9a39b3)
commit e95a79eef0589be2f7d0470bfe6ba19b006730c6
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed May 24 21:06:45 2023 +0200
siprepo: check if list is set on insert
(cherry picked from commit 423a818cf6e8f6d672630a0365e13877a173508f)
commit 408643ec916bc00f9f9447952e553d129f8ec896
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue May 23 09:41:13 2023 +0200
ipops: create container items if not found for srv and naptr functions
- GH #3419
(cherry picked from commit 7971d825361bee29d65fcea69f2978d7af31eeaa)
commit 1c23c2ff23b5c25c943856f5064739794d71bc7f
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jun 2 21:20:59 2023 +0200
pv: exported {val} transformation
(cherry picked from commit 79b82198075250420cb08d6b5fd5b100ff672606)
commit da7944e2f4c7e6f344d125da325c388e1836662f
Author: Henning Westerholt <hw@gilawa.com>
Date: Thu May 18 10:52:52 2023 +0000
dispatcher: fix force send socket functionality, was not working in some TCP scenarios
(cherry picked from commit 6183319381573e42b882d05ae1748539f7547d8c)
===================== 2023-05-17 Version 5.7.0 Released =====================
===================== Changes Since Version 5.6.0 ===========================

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3
"""
* $Id$
*
@ -26,201 +26,210 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
"""
import sys,re
import sys, re
max_depth = 120
debug = 0
re_main_route = re.compile("^([a-z]+_)*route[\s\t]*(?![\(\)])[\s\t]*\{?", re.I)
re_def_route = re.compile("^([a-z]+_)*route ?(\[\"?([A-Za-z0-9-_:]+)\"?\])+[\s\t]*\{?", re.I)
re_call_route = re.compile("^(.*\([\s\t!]*)?route\(\"?([A-Za-z0-9-_]+)\"?\)", re.I)
routes = {}
f_routes = {}
b_routes = {}
or_routes = {}
r_routes = {}
s_routes = {}
e_routes = {}
re_main_route = re.compile("^([a-z]+_)*route[\s\t]*(?![\(\)])[\s\t]*\{?", re.I) # Regular expression to match main routes
re_def_route = re.compile("^([a-z]+_)*route ?(\[\"?([A-Za-z0-9-_:]+)\"?\])+[\s\t]*\{?", re.I) # Regular expression to match defined routes
re_call_route = re.compile("^(.*\([\s\t!]*)?route\(\"?([A-Za-z0-9-_]+)\"?\)", re.I) # Regular expression to match called routes
routes = {} # Dictionary to store main routes
f_routes = {} # Dictionary to store failure routes
b_routes = {} # Dictionary to store branch routes
or_routes = {} # Dictionary to store onreply routes
r_routes = {} # Dictionary to store reply routes
s_routes = {} # Dictionary to store onsend routes
e_routes = {} # Dictionary to store event routes
def log(_s):
if debug:
print _s
if debug:
print(_s)
def print_route_level(_l, _n):
log("prl: %i, %s" % (_l, _n))
if _l > max_depth:
return
spacer = ""
route = ""
for i in range(_l):
spacer += "| "
if i < _l - 1:
route += "| "
else:
route += "\- " + str(_n)
if len(spacer) > 0:
print spacer
if len(route) > 0:
print route
log(f"prl: {_l}, {_n}")
if _l > max_depth:
return
spacer = ""
route = ""
for i in range(_l):
spacer += "| "
if i < _l - 1:
route += "| "
else:
route += "\- " + str(_n)
if len(spacer) > 0:
print(spacer)
if len(route) > 0:
print(route)
def traverse_routes(_level, _name):
log("tr: %i, %s" % (_level, _name))
if _level > max_depth:
print "warning: max_depth reached"
return
print_route_level(_level, _name)
if routes.has_key(_name):
for r in routes[_name]:
traverse_routes(_level + 1, r)
log(f"tr: {_level}, {_name}")
if _level > max_depth:
print("warning: max_depth reached")
return
print_route_level(_level, _name)
if _name in routes:
for r in routes[_name]:
traverse_routes(_level + 1, r)
# Checking command-line arguments
if len(sys.argv) < 2:
raise Exception('wrong number of arguments\nusage: ' + sys.argv[0] + ' configuration-file [max_depth]')
raise Exception('wrong number of arguments\nusage: ' + sys.argv[0] + ' configuration-file [max_depth]')
if len(sys.argv) == 3:
max_depth = int(sys.argv[2])
cfg = file(sys.argv[1], "r")
max_depth = int(sys.argv[2])
cfg = open(sys.argv[1], "r")
if cfg is None:
raise Exception ('Missing config file')
raise Exception('Missing config file')
# Reading the configuration file
line = cfg.readline()
rt = routes
while line:
line = line.strip()
if not line.startswith("#"):
log(line)
main_match = re_main_route.search(line)
def_match = re_def_route.search(line)
call_match = re_call_route.search(line)
if not call_match is None:
log("CALL: " + line)
name = call_match.group(2)
log(rname +":"+name)
rt[rname].append(name)
elif not def_match is None:
log("DEF: " + line)
rtype = def_match.group(1)
rname = def_match.group(3)
if rtype == "failure_":
rt = f_routes
if rname is None:
rname = "failure"
elif rtype == "onreply_":
rt = or_routes
if rname is None:
rname = "onreply"
elif rtype == "reply_":
rt = r_routes
if rname is None:
rname = "reply"
elif rtype == "onsend_":
rt = s_routes
if rname is None:
rname = "onsend"
elif rtype == "branch_":
rt = b_routes
if rname is None:
rname = "branch"
elif rtype == "event_":
rt = e_routes
if rname is None:
rname = "event"
else:
rt = routes
log(rname)
rt[rname] = []
elif not main_match is None:
log("MAIN: " + line)
rtype = main_match.group(1)
if rtype == "failure_":
rt = f_routes
rname = "failure"
elif rtype == "onreply_":
rt = or_routes
rname = "onreply"
elif rtype == "reply_":
rt = r_routes
rname = "reply"
elif rtype == "onsend_":
rt = s_routes
rname = "onsend"
elif rtype == "branch_":
rt = b_routes
rname = "branch"
elif rtype == "event_":
rt = e_routes
rname = "event"
else:
rt = routes
rname = "Main"
log(rname)
rt[rname] = []
line = cfg.readline()
log("routes: %s" % (routes))
log("branch_routes: %s" % (b_routes))
log("failure_routes: %s" % (f_routes))
log("onreply_routes: %s" % (or_routes))
log("reply_routes: %s" % (r_routes))
log("onsend_routes: %s" % (s_routes))
log("event_routes: %s" % (e_routes))
line = line.strip()
if not line.startswith("#"):
log(line)
main_match = re_main_route.search(line)
def_match = re_def_route.search(line)
call_match = re_call_route.search(line)
# Matching a called route
if call_match is not None:
log("CALL: " + line)
name = call_match.group(2)
log(f"{rname}:{name}")
rt[rname].append(name)
# Matching a defined route
elif def_match is not None:
log("DEF: " + line)
rtype = def_match.group(1)
rname = def_match.group(3)
if rtype == "failure_":
rt = f_routes
if rname is None:
rname = "failure"
elif rtype == "onreply_":
rt = or_routes
if rname is None:
rname = "onreply"
elif rtype == "reply_":
rt = r_routes
if rname is None:
rname = "reply"
elif rtype == "onsend_":
rt = s_routes
if rname is None:
rname = "onsend"
elif rtype == "branch_":
rt = b_routes
if rname is None:
rname = "branch"
elif rtype == "event_":
rt = e_routes
if rname is None:
rname = "event"
else:
rt = routes
log(rname)
rt[rname] = []
# Matching a main route
elif main_match is not None:
log("MAIN: " + line)
rtype = main_match.group(1)
if rtype == "failure_":
rt = f_routes
rname = "failure"
elif rtype == "onreply_":
rt = or_routes
rname = "onreply"
elif rtype == "reply_":
rt = r_routes
rname = "reply"
elif rtype == "onsend_":
rt = s_routes
rname = "onsend"
elif rtype == "branch_":
rt = b_routes
rname = "branch"
elif rtype == "event_":
rt = e_routes
rname = "event"
else:
rt = routes
rname = "Main"
log(rname)
rt[rname] = []
line = cfg.readline()
log(f"routes: {routes}")
log(f"branch_routes: {b_routes}")
log(f"failure_routes: {f_routes}")
log(f"onreply_routes: {or_routes}")
log(f"reply_routes: {r_routes}")
log(f"onsend_routes: {s_routes}")
log(f"event_routes: {e_routes}")
# Checking for missing routes
for name in routes.keys():
for val in routes[name]:
if not routes.has_key(val):
print "Missing Route %s!!!" % val
# checking for unreferenced routes does not work yet because functions
# can call routes as well?!
#found = False
#for n in routes.keys():
# for v in routes[n]:
# if v == name:
# found = True
#if not found and (not (name == "Main" or name == "Failure" or name == "Onreply" or name == "Branch")):
# print "Unreferenced Route %s!!!" % name
print "\nMain"
for val in routes[name]:
if val not in routes:
print(f"Missing Route {val}!!!")
print("\nMain")
traverse_routes(0, "Main")
# Printing branch routes
if len(b_routes) > 0:
print "\nBranch routes\n-------------"
for br in b_routes.keys():
print "\n%s" % (br)
for r in b_routes[br]:
traverse_routes(1, r)
print("\nBranch routes\n-------------")
for br in b_routes.keys():
print(f"\n{br}")
for r in b_routes[br]:
traverse_routes(1, r)
# Printing onsend routes
if len(s_routes) > 0:
print "\nSend routes\n-----------"
for sr in s_routes.keys():
print "\n%s" % (sr)
for r in s_routes[sr]:
traverse_routes(1, r)
print("\nSend routes\n-----------")
for sr in s_routes.keys():
print(f"\n{sr}")
for r in s_routes[sr]:
traverse_routes(1, r)
# Printing failure routes
if len(f_routes) > 0:
print "\nFailure routes\n--------------"
for fr in f_routes.keys():
print "\n%s" % (fr)
for r in f_routes[fr]:
traverse_routes(1, r)
print("\nFailure routes\n--------------")
for fr in f_routes.keys():
print(f"\n{fr}")
for r in f_routes[fr]:
traverse_routes(1, r)
# Printing onreply routes
if len(or_routes) > 0:
print "\nOnreply routes\n--------------"
for onr in or_routes.keys():
print "\n%s" % (onr)
for r in or_routes[onr]:
traverse_routes(1, r)
print("\nOnreply routes\n--------------")
for onr in or_routes.keys():
print(f"\n{onr}")
for r in or_routes[onr]:
traverse_routes(1, r)
# Printing reply routes
if len(r_routes) > 0:
print "\nReply routes\n--------------"
for onr in r_routes.keys():
print "\n%s" % (onr)
for r in r_routes[onr]:
traverse_routes(1, r)
print("\nReply routes\n--------------")
for onr in r_routes.keys():
print(f"\n{onr}")
for r in r_routes[onr]:
traverse_routes(1, r)
# Printing event routes
if len(e_routes) > 0:
print "\nEvent routes\n--------------"
for onr in e_routes.keys():
print "\n%s" % (onr)
for r in e_routes[onr]:
traverse_routes(1, r)
print
print("\nEvent routes\n--------------")
for onr in e_routes.keys():
print(f"\n{onr}")
for r in e_routes[onr]:
traverse_routes(1, r)
print()
cfg.close()

@ -4,7 +4,7 @@
# Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
pkgname=kamailio
pkgver=5.1.0
pkgver=5.7.1
pkgrel=0
# If building from a git snapshot, specify the gitcommit
@ -31,7 +31,7 @@ makedepends="bison db-dev flex freeradius-client-dev expat-dev
confuse-dev ncurses-dev sqlite-dev lua-dev openldap-dev openssl-dev
net-snmp-dev libuuid libev-dev jansson-dev json-c-dev libevent-dev
linux-headers libmemcached-dev rabbitmq-c-dev hiredis-dev
ruby-dev libmaxminddb-dev libunistring-dev mongo-c-driver-dev"
ruby-dev libmaxminddb-dev libunistring-dev mongo-c-driver-dev libwebsockets-dev"
install="$pkgname.pre-install $pkgname.pre-upgrade"
@ -137,7 +137,7 @@ _mod_list_tls="auth_identity crypto tls"
_mod_list_outbound="outbound"
# - modules depending on unistring library
_mod_list_websocket="websocket"
_mod_list_websocket="websocket lwsc"
# - modules depending on libval-threads libcrypto libsres libpthread
_mod_list_dnssec="dnssec"

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,3 +1,9 @@
kamailio (5.7.1) unstable; urgency=medium
* version set 5.7.1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 09:35:54 +0200
kamailio (5.7.0) unstable; urgency=medium
* version set 5.7.0

@ -1,5 +1,5 @@
%define name kamailio
%define ver 5.4.0
%define ver 5.7.1
%define rel dev1.0%{dist}
%if 0%{?fedora}

@ -982,11 +982,11 @@ install_initd_debian install-initd-debian:
-e "s#HOMEDIR=/run/kamailio#HOMEDIR=/run/$(NAME)#g" \
-e "s#DEFAULTS=/etc/default/kamailio#DEFAULTS=/etc/default/$(NAME)#g" \
-e "s#CFGFILE=/etc/kamailio/kamailio.cfg#CFGFILE=$(cfg_prefix)/$(cfg_dir)$(NAME).cfg#g" \
< pkg/kamailio/deb/debian/kamailio.init \
< ../pkg/kamailio/deb/debian/kamailio.init \
> /etc/init.d/$(NAME)
chmod +x /etc/init.d/$(NAME)
sed -e "s#RUN_KAMAILIO=no#RUN_KAMAILIO=yes#g" \
< pkg/kamailio/deb/debian/kamailio.default \
< ../pkg/kamailio/deb/debian/kamailio.default \
> /etc/default/$(NAME)
mkdir -p /run/$(NAME)
adduser --quiet --system --group --disabled-password \
@ -1002,13 +1002,13 @@ install_initd_centos install-initd-centos:
-e "s#PID_FILE=/run/kamailio.pid#PID_FILE=/run/$(NAME).pid#g" \
-e "s#LOCK_FILE=/var/lock/subsys/kamailio#LOCK_FILE=/var/lock/subsys/$(NAME)#g" \
-e "s#KAMCFG=/etc/kamailio/kamailio.cfg#KAMCFG=$(cfg_prefix)/$(cfg_dir)$(NAME).cfg#g" \
< pkg/kamailio/rpm/kamailio.init \
< ../pkg/kamailio/rpm/kamailio.init \
> /etc/init.d/$(NAME)
chmod +x /etc/init.d/$(NAME)
sed -e "s#RUN_KAMAILIO=no#RUN_KAMAILIO=yes#g" \
-e "s#USER=kamailio#USER=$(NAME)#g" \
-e "s#GROUP=kamailio#GROUP=$(NAME)#g" \
< pkg/kamailio/rpm/kamailio.default \
< ../pkg/kamailio/rpm/kamailio.default \
> /etc/default/$(NAME)
mkdir -p /run/$(NAME)
/usr/sbin/groupadd -r $(NAME)

@ -106,7 +106,7 @@ INSTALL_FLAVOUR=$(FLAVOUR)
# version number
VERSION = 5
PATCHLEVEL = 7
SUBLEVEL = 0
SUBLEVEL = 1
EXTRAVERSION =
# memory manager switcher

@ -23,7 +23,7 @@ mod_list_extra=avp auth_diameter call_control call_obj dmq domainpolicy msrp \
carrierroute pdb qos sca seas sms sst timer tmrec uac_redirect \
xhttp xhttp_rpc xprint jsonrpcs nosip dmq_usrloc statsd rtjson \
log_custom keepalive ss7ops app_sqlang acc_diameter evrexec \
sipjson lrkproxy math xhttp_prom
sipjson lrkproxy math posops xhttp_prom
# - common modules depending on database
mod_list_db=acc alias_db auth_db avpops cfg_db db_text db_flatstore \

@ -2,6 +2,6 @@
* DO NOT EDIT IT
*/
#define REPO_VER "f1e91d"
#define REPO_HASH "f1e91d"
#define REPO_VER "4238e4"
#define REPO_HASH "4238e4"
#define REPO_STATE ""

@ -40,12 +40,16 @@ static sr_kemi_xval_t _sr_kemi_core_exec_xval;
*/
static inline sr_kemi_xval_t* sr_kemi_return_int(sr_kemi_t *ket, int ret)
{
_sr_kemi_core_exec_xval.vtype = SR_KEMIP_INT;
_sr_kemi_core_exec_xval.v.n = ret;
if(ket->rtype & SR_KEMIP_BOOL) {
_sr_kemi_core_exec_xval.vtype = SR_KEMIP_BOOL;
_sr_kemi_core_exec_xval.v.n = ret;
} else {
_sr_kemi_core_exec_xval.vtype = SR_KEMIP_INT;
_sr_kemi_core_exec_xval.v.n = ret;
}
return &_sr_kemi_core_exec_xval;
}
/**
*
*/

@ -24,6 +24,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "../../core/dprint.h"
#include "../../core/ut.h"
@ -271,7 +272,7 @@ int async_sleep(sip_msg_t *msg, int seconds, cfg_action_t *act, str *cbname)
return 0;
}
static unsigned int _async_timer_exec_last_slot = -1;
static unsigned int _async_timer_exec_last_slot = UINT_MAX;
void async_timer_exec(unsigned int ticks, void *param)
{
@ -292,7 +293,7 @@ void async_timer_exec(unsigned int ticks, void *param)
return;
}
if(_async_timer_exec_last_slot < 0) {
if(_async_timer_exec_last_slot == UINT_MAX) {
_async_timer_exec_last_slot = idx;
}
slot = (_async_timer_exec_last_slot + 1) % ASYNC_RING_SIZE;

@ -278,12 +278,12 @@ int authorize(struct sip_msg* msg, pv_elem_t* realm, int hftype)
/*
* This function creates and submits diameter authentication request as per
* draft-srinivas-aaa-basic-digest-00.txt.
* draft-srinivas-aaa-basic-digest-00.txt.
* Service type of the request is Authenticate-Only.
* Returns:
* 1 - success
* -1 - error
*
*
*/
int diameter_authorize(struct hdr_field* hdr, str* p_method, sip_uri_t *uri,
sip_uri_t *ruri, unsigned int m_id, rd_buf_t* rb)
@ -321,6 +321,7 @@ int diameter_authorize(struct hdr_field* hdr, str* p_method, sip_uri_t *uri,
if(!(user_name.s))
{
PKG_MEM_ERROR;
AAAFreeMessage(&req);
return -1;
}
memset(user_name.s, 0, user_name.len);
@ -460,6 +461,7 @@ int diameter_authorize(struct hdr_field* hdr, str* p_method, sip_uri_t *uri,
if(!(user_name.s))
{
PKG_MEM_ERROR;
AAAFreeMessage(&req);
return -1;
}
memset(user_name.s, 0, user_name.len);

@ -202,8 +202,12 @@ int cc_acc_client_stateful_sm_process(cdp_session_t* s, int event, AAAMessage* m
case ACC_CC_EV_RECV_ANS_SUCCESS:
x->state = ACC_CC_ST_DISCON;
// update_gsu_response_timers(x, msg);
x->discon_time = time(0);
break;
case ACC_CC_EV_RECV_ANS_UNSUCCESS:
x->state = ACC_CC_ST_DISCON;
x->discon_time = time(0);
break;
default:
LM_DBG("Received event [%d] in state [%d] - cleaning up session regardless\n", event, x->state);
//have to leave session alone because our client app still has to be given this msg

@ -130,9 +130,13 @@ int create_socket(str ip_proto,int listen_port,str bind_to,unsigned int *sock)
goto error;
}
option = 1;
setsockopt(server_sock,SOL_SOCKET,SO_REUSEADDR,&option,sizeof(option));
if(setsockopt(server_sock, SOL_SOCKET, SO_REUSEADDR, &option,
sizeof(option))
< 0) {
LM_WARN("failed to set SO_REUSEADDR option for server socket\n");
}
if (bind( server_sock,ainfo->ai_addr,ainfo->ai_addrlen)==-1 ) {
if(bind(server_sock, ainfo->ai_addr, ainfo->ai_addrlen) == -1) {
LM_ERR("create_socket(): error binding on %s port %s >"
" %s\n",host,serv,strerror(errno));
goto error;

@ -79,7 +79,7 @@ void _cfgt_remove_report(const str *scen)
DIR *folder = NULL;
struct dirent *next_file = NULL;
if(_cfgt_get_filename(0, *scen, &dest, &dir) < 0) {
if(_cfgt_get_filename(0, *scen, &dest, &dir) < 0 || dest.s == NULL) {
LM_ERR("can't build filename for uuid: %.*s\n", scen->len, scen->s);
return;
}
@ -124,10 +124,11 @@ void _cfgt_remove_report(const str *scen)
}
end:
if(filepath.s)
if(filepath.s) {
pkg_free(filepath.s);
if(dest.s)
pkg_free(dest.s);
}
pkg_free(dest.s);
}
int _cfgt_remove_uuid(const str *uuid, int remove_report)

@ -881,11 +881,14 @@ static int ki_dp_translate(sip_msg_t* msg, int id, str *input_spv, str *output_s
return -1;
}
if (input_spv == NULL && output_spv == NULL) {
if(input_spv == NULL || input_spv->len <= 0) {
pvs_i = pv_cache_get(&dp_default_param_s);
pvs_o = pv_cache_get(&dp_default_param_s);
} else {
pvs_i = pv_cache_get(input_spv);
}
if(output_spv == NULL || output_spv->len <= 0) {
pvs_o = pv_cache_get(&dp_default_param_s);
} else {
pvs_o = pv_cache_get(output_spv);
}

@ -1860,7 +1860,8 @@ static inline int ds_push_dst(sip_msg_t *msg, str *uri, socket_info_t *sock,
break;
}
if(sock) {
msg->force_send_socket = sock;
LM_DBG("set send socket to %.*s\n", sock->sock_str.len, sock->sock_str.s);
set_force_socket(msg, sock);
}
return 0;
}

@ -155,10 +155,19 @@ static int curL_request_url(struct sip_msg *_m, const char *_met,
res = curl_easy_setopt(curl, CURLOPT_URL, _url);
/* Limit to HTTP and HTTPS protocols */
#if defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7, 85, 0)
res = curl_easy_setopt(curl, CURLOPT_PROTOCOLS_STR, "http,https");
#else
res = curl_easy_setopt(
curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
#endif
#if defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7, 85, 0)
res = curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS_STR, "http,https");
#else
res = curl_easy_setopt(
curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
#endif
if(_met != NULL) {
/* Enforce method (GET, PUT, ...) */
@ -383,8 +392,13 @@ static int curL_request_url(struct sip_msg *_m, const char *_met,
if((stat >= 200) && (stat < 500)) {
double datasize = 0;
#if defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7, 55, 0)
curl_off_t dlsize;
curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &dlsize);
download_size = (double)dlsize;
#else
curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &download_size);
#endif
LM_DBG(" -- curl download size: %u \n", (unsigned int)download_size);
datasize = download_size;

@ -39,7 +39,7 @@ Yasin Caner
3.11. matching_mode (int)
3.12. cseq_delay (int)
3.13. fetch_rows(int)
3.14. hash_size (string)
3.14. hash_size (int)
3.15. subs_hash_size (int)
3.16. contacts_hash_size (integer)
3.17. nat_bflag (integer)
@ -108,7 +108,7 @@ Chapter 1. Admin Guide
3.11. matching_mode (int)
3.12. cseq_delay (int)
3.13. fetch_rows(int)
3.14. hash_size (string)
3.14. hash_size (int)
3.15. subs_hash_size (int)
3.16. contacts_hash_size (integer)
3.17. nat_bflag (integer)
@ -157,7 +157,7 @@ Chapter 1. Admin Guide
3.11. matching_mode (int)
3.12. cseq_delay (int)
3.13. fetch_rows(int)
3.14. hash_size (string)
3.14. hash_size (int)
3.15. subs_hash_size (int)
3.16. contacts_hash_size (integer)
3.17. nat_bflag (integer)
@ -315,7 +315,7 @@ st/scscf")
...
modparam("ims_usrloc_scscf", "fetch_rows", 3000)
3.14. hash_size (string)
3.14. hash_size (int)
The number of entries of the hash table used by usrloc

@ -231,7 +231,7 @@
</example>
</section>
<section id="ims_usrloc_scscf.p.hash_size">
<title>hash_size (string)</title>
<title>hash_size (int)</title>
<para>The number of entries of the hash table used by usrloc </para>
<para><emphasis> Default value 512</emphasis></para>
<example>

@ -642,7 +642,7 @@ static sr_srv_item_t *_sr_srv_list = NULL;
*
* INPUT:
* Arg (1) = pvid string pointer
* Arg (2) = find flag; <>0=search only
* Arg (2) = find flag; 0 - add if not found; 1 - search only
* OUTPUT: srv record pointer; NULL=not found
**********/
@ -1031,9 +1031,9 @@ int srv_update_pv (str *srvcname, str *pvid)
LM_DBG ("service name missing: %.*s\n", srvcname->len, srvcname->s);
return -2;
}
pitem = sr_srv_add_item (pvid, 1);
if (!pitem) {
LM_DBG ("pvid not found: %.*s\n", pvid->len, pvid->s);
pitem = sr_srv_add_item(pvid, 0);
if(!pitem) {
LM_DBG("pvid not found: %.*s\n", pvid->len, pvid->s);
return -3;
}
@ -1194,7 +1194,7 @@ static sr_naptr_item_t *_sr_naptr_list = NULL;
*
* INPUT:
* Arg (1) = pvid string pointer
* Arg (2) = find flag; <>0=search only
* Arg (2) = find flag; 0 - add if not found, 1 - search only
* OUTPUT: naptr record pointer; NULL=not found
**********/
@ -1500,9 +1500,9 @@ int naptr_update_pv(str *naptrname, str *pvid)
LM_DBG ("naptr name missing: %.*s\n", naptrname->len, naptrname->s);
return -2;
}
pitem = sr_naptr_add_item(pvid, 1);
if (!pitem) {
LM_DBG ("pvid not found: %.*s\n", pvid->len, pvid->s);
pitem = sr_naptr_add_item(pvid, 0);
if(!pitem) {
LM_DBG("pvid not found: %.*s\n", pvid->len, pvid->s);
return -3;
}

@ -176,12 +176,12 @@ val character varying(4096) DEFAULT "" NOT NULL
+ size: size of the queue. Specifies the maximum number of items
in queue. If exceeded the oldest one is removed. If not set
the queue will be limitless.
+ dbmode: If set to 1, the content of the queue is written to
database table when the SIP server is stopped (i.e., ensure
persistency over restarts). If set to 2, it is written at
shutdown but not read at startup. If set to 3, it is read at
sartup but not written at shutdown. Default value is 0 (no db
table interaction).
+ dbmode: If set to 1, the content of the queue is read from
database at startup and is written to database table when the
SIP server is stopped (i.e., ensure persistency over
restarts). If set to 2, it is read at startup but not written
at shutdown. If set to 3, it is written at shutdown but not
read at startup. Default value is 0 (no db table interaction).
+ addmode: how to add new (key,value) pairs.
o 0: Will push all new (key,value) pairs at the end of the
queue. (default)

@ -124,10 +124,11 @@ val character varying(4096) DEFAULT "" NOT NULL
<listitem>
<para>
<emphasis>dbmode</emphasis>: If set to 1, the content of the queue
is read from database at startup and
is written to database table when the SIP server is stopped
(i.e., ensure persistency over restarts).
If set to 2, it is written at shutdown but not read at startup.
If set to 3, it is read at sartup but not written at shutdown.
If set to 2, it is read at startup but not written at shutdown.
If set to 3, it is written at shutdown but not read at startup.
Default value is 0 (no db table interaction).
</para>
</listitem>

@ -114,6 +114,8 @@ struct module_exports exports = {
*/
static int mod_init(void)
{
mq_head_t *mh = mq_head_get(NULL);
if(!mq_head_defined())
LM_WARN("no mqueue defined\n");
@ -122,6 +124,17 @@ static int mod_init(void)
return 1;
}
while(mh != NULL) {
if (mh->dbmode == 1 || mh->dbmode == 2) {
if(mqueue_db_load_queue(&(mh->name)) < 0) {
LM_ERR("error loading mqueue: %.*s from DB\n",
mh->name.len, mh->name.s);
return 1;
}
}
mh = mh->next;
}
return 0;
}
@ -265,15 +278,8 @@ int mq_param(modparam_t type, void *val)
free_params(params_list);
return -1;
}
LM_INFO("mqueue param: [%.*s|%d|%d]\n", qname.len, qname.s, dbmode, addmode);
if(dbmode == 1 || dbmode == 2) {
if(mqueue_db_load_queue(&qname)<0)
{
LM_ERR("error loading mqueue: %.*s from DB\n", qname.len, qname.s);
free_params(params_list);
return -1;
}
}
LM_INFO("mqueue param: [%.*s|%d|%d]\n", qname.len, qname.s, dbmode,
addmode);
mq_set_dbmode(&qname, dbmode);
free_params(params_list);
return 0;

@ -62,6 +62,8 @@ static tr_export_t mod_trans[] = {
tr_parse_line },
{ {"urialias", sizeof("urialias")-1}, /* uri alias class */
tr_parse_urialias },
{{"val", sizeof("val") - 1}, /* val class */
tr_parse_val},
{ { 0, 0 }, 0 }
};

@ -242,7 +242,9 @@ int siprepo_msg_set(sip_msg_t *msg, str *msgid, int rmode)
it->pid = msg->pid;
it->mflags = msg->flags;
_siprepo_table[slotid].plist->prev = it;
if(_siprepo_table[slotid].plist!=NULL) {
_siprepo_table[slotid].plist->prev = it;
}
it->next = _siprepo_table[slotid].plist;
_siprepo_table[slotid].plist = it;

@ -672,7 +672,7 @@ int ki_sst_check_min(struct sip_msg *msg, int flag)
* too small. We will take the smaller of the messages
* Session-expires and min-se if stated.
*/
if (sst_min_se < MIN(minse, se.interval)) {
if(sst_min_se > MIN(minse, se.interval)) {
/*
* Too small. See if we need to send the 422 and are able
* to send it.

@ -30,6 +30,10 @@
#include <openssl/bn.h>
#include <openssl/dh.h>
#if OPENSSL_VERSION_NUMBER >= 0x030000000L
#define OPENSSL_NO_ENGINE
#endif
#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
#include "tls_map.h"

@ -45,6 +45,10 @@
#include <pthread.h>
#include <openssl/ssl.h>
#if OPENSSL_VERSION_NUMBER >= 0x030000000L
#include <openssl/rand.h>
#endif
#include "../../core/dprint.h"
#include "../../core/mem/shm_mem.h"
#include "../../core/tcp_init.h"
@ -740,13 +744,54 @@ int tls_h_mod_pre_init_f(void)
LM_DBG("preparing tls env for modules initialization\n");
#if OPENSSL_VERSION_NUMBER >= 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER)
LM_DBG("preparing tls env for modules initialization (libssl >=1.1)\n");
#if OPENSSL_VERSION_NUMBER >= 0x010101000L
OPENSSL_init_ssl(OPENSSL_INIT_ATFORK, NULL);
#else
OPENSSL_init_ssl(0, NULL);
#endif
#else
LM_DBG("preparing tls env for modules initialization (libssl <=1.0)\n");
SSL_library_init();
#endif
SSL_load_error_strings();
tls_mod_preinitialized=1;
#if OPENSSL_VERSION_NUMBER >= 0x030000000L
do {
OSSL_LIB_CTX *osslglobal = NULL;
EVP_RAND_CTX *randctx = NULL;
LM_DBG("enabling locking for rand ctx\n");
osslglobal = OSSL_LIB_CTX_get0_global_default();
if(osslglobal == NULL) {
LM_ERR("failed to get lib ssl global ctx\n");
return -1;
}
randctx = RAND_get0_primary(osslglobal);
if(randctx == NULL) {
LM_ERR("primary rand ctx is null\n");
return -1;
}
EVP_RAND_enable_locking(randctx);
randctx = RAND_get0_public(osslglobal);
if(randctx == NULL) {
LM_ERR("public rand ctx is null\n");
return -1;
}
EVP_RAND_enable_locking(randctx);
randctx = RAND_get0_private(osslglobal);
if(randctx == NULL) {
LM_ERR("private rand ctx is null\n");
return -1;
}
EVP_RAND_enable_locking(randctx);
} while(0);
#endif
tls_mod_preinitialized = 1;
return 0;
}

@ -87,6 +87,9 @@ int ksr_rand_engine_param(modparam_t type, void* val);
MODULE_VERSION
#if OPENSSL_VERSION_NUMBER >= 0x030000000L
#define OPENSSL_NO_ENGINE
#endif
extern str sr_tls_event_callback;
str sr_tls_xavp_cfg = {0, 0};
@ -450,7 +453,8 @@ static int mod_child(int rank)
&mod_params, &mod_params) < 0)
return -1;
}
#if OPENSSL_VERSION_NUMBER >= 0x010101000L
#if OPENSSL_VERSION_NUMBER >= 0x010101000L \
&& OPENSSL_VERSION_NUMBER < 0x030000000L
if(ksr_tls_init_mode&TLS_MODE_FORK_PREPARE) {
OPENSSL_fork_prepare();
}
@ -458,7 +462,8 @@ static int mod_child(int rank)
return 0;
}
#if OPENSSL_VERSION_NUMBER >= 0x010101000L
#if OPENSSL_VERSION_NUMBER >= 0x010101000L \
&& OPENSSL_VERSION_NUMBER < 0x030000000L
if(ksr_tls_init_mode&TLS_MODE_FORK_PREPARE) {
if(rank==PROC_POSTCHILDINIT) {
/*
@ -501,7 +506,8 @@ static void mod_destroy(void)
int ksr_rand_engine_param(modparam_t type, void* val)
{
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
#if OPENSSL_VERSION_NUMBER >= 0x10100000L \
&& OPENSSL_VERSION_NUMBER < 0x030000000L
str *reng;
if(val==NULL) {
@ -669,7 +675,8 @@ int mod_register(char *path, int *dlflags, void *p1, void *p2)
register_tls_hooks(&tls_h);
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
#if OPENSSL_VERSION_NUMBER >= 0x10100000L \
&& OPENSSL_VERSION_NUMBER < 0x030000000L
LM_DBG("setting cryptorand random engine\n");
RAND_set_rand_method(RAND_ksr_cryptorand_method());
#endif

@ -29,7 +29,8 @@
#include "tls_rand.h"
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
#if OPENSSL_VERSION_NUMBER >= 0x10100000L \
&& OPENSSL_VERSION_NUMBER < 0x030000000L
#include "../../core/dprint.h"
#include "../../core/locking.h"

@ -21,7 +21,8 @@
#define _TLS_RAND_H_
#include <openssl/ssl.h>
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
#if OPENSSL_VERSION_NUMBER >= 0x10100000L \
&& OPENSSL_VERSION_NUMBER < 0x030000000L
#include <openssl/rand.h>

@ -128,6 +128,9 @@ int tls_run_event_routes(struct tcp_connection *c);
#endif /* __SUNPRO_c */
#endif /* TLS_RD_DEBUG */
#if OPENSSL_VERSION_NUMBER >= 0x030000000L
#define OPENSSL_NO_ENGINE
#endif
extern str sr_tls_xavp_cfg;

@ -1403,6 +1403,8 @@ void free_cfg_grp_lst()
while(grp){
last=grp;
grp=grp->next;
if(last->var_names)
free(last->var_names);
free(last);
}
cfg_grp_lst=0;

Loading…
Cancel
Save