From e1ddb6733fd589967c22103e0bd206eb830357ec Mon Sep 17 00:00:00 2001 From: Andreas Gnau Date: Wed, 30 Aug 2023 18:36:14 +0200 Subject: pjproject: Add PKG_CPE_ID Signed-off-by: Andreas Gnau (cherry picked from commit 2b3ae318e46bd92b6bbf751f2340d37be87d3065) --- libs/pjproject/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/pjproject/Makefile b/libs/pjproject/Makefile index de4808d..9b5372c 100644 --- a/libs/pjproject/Makefile +++ b/libs/pjproject/Makefile @@ -12,6 +12,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pjproject PKG_VERSION:=2.13.1 PKG_RELEASE:=1 +PKG_CPE_ID:=cpe:/a:pjsip:pjsip # download "vX.Y.tar.gz" as "pjproject-vX.Y.tar.gz" PKG_SOURCE_URL_FILE:=$(PKG_VERSION).tar.gz -- cgit From ab639960fd6a26f3690709c0d0220b85990ab8ed Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Fri, 29 Dec 2023 09:01:10 +0100 Subject: pjproject: sync patches with asterisk 18.20.2 Signed-off-by: Sebastian Kemper (cherry picked from commit 6643627656e1b66654bb0ab1a744b50dbec9d2b6) --- libs/pjproject/Makefile | 2 +- libs/pjproject/patches/0004-config_site.patch | 10 ++++++++- .../patches/0020-log-dropped-packet-in-debug.patch | 26 ++++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 libs/pjproject/patches/0020-log-dropped-packet-in-debug.patch diff --git a/libs/pjproject/Makefile b/libs/pjproject/Makefile index 9b5372c..326708c 100644 --- a/libs/pjproject/Makefile +++ b/libs/pjproject/Makefile @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pjproject PKG_VERSION:=2.13.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_CPE_ID:=cpe:/a:pjsip:pjsip # download "vX.Y.tar.gz" as "pjproject-vX.Y.tar.gz" diff --git a/libs/pjproject/patches/0004-config_site.patch b/libs/pjproject/patches/0004-config_site.patch index 3a1e1b9..d9d67ae 100644 --- a/libs/pjproject/patches/0004-config_site.patch +++ b/libs/pjproject/patches/0004-config_site.patch @@ -1,6 +1,6 @@ --- /dev/null +++ b/pjlib/include/pj/config_site.h -@@ -0,0 +1,83 @@ +@@ -0,0 +1,91 @@ +/* + * Asterisk config_site.h + */ @@ -84,3 +84,11 @@ +#define PJSIP_TSX_UAS_CONTINUE_ON_TP_ERROR 0 +#define PJ_SSL_SOCK_OSSL_USE_THREAD_CB 0 +#define PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER 1 ++ ++/* ++ * The default is 32 with 8 being used by pjproject itself. ++ * Since this value is used in invites, dialogs, transports ++ * and subscriptions as well as the global pjproject endpoint, ++ * we don't want to increase it too much. ++ */ ++#define PJSIP_MAX_MODULE 38 diff --git a/libs/pjproject/patches/0020-log-dropped-packet-in-debug.patch b/libs/pjproject/patches/0020-log-dropped-packet-in-debug.patch new file mode 100644 index 0000000..e625f2e --- /dev/null +++ b/libs/pjproject/patches/0020-log-dropped-packet-in-debug.patch @@ -0,0 +1,26 @@ +--- a/pjsip/src/pjsip/sip_transport.c ++++ b/pjsip/src/pjsip/sip_transport.c +@@ -2088,15 +2088,17 @@ PJ_DEF(pj_ssize_t) pjsip_tpmgr_receive_p + * which were sent to keep NAT bindings. + */ + if (tmp.slen) { +- PJ_LOG(1, (THIS_FILE, +- "Error processing %d bytes packet from %s %s:%d %.*s:\n" +- "%.*s\n" +- "-- end of packet.", ++ PJ_LOG(2, (THIS_FILE, ++ "Dropping %d bytes packet from %s %s:%d %.*s\n", + msg_fragment_size, + rdata->tp_info.transport->type_name, +- rdata->pkt_info.src_name, ++ rdata->pkt_info.src_name, + rdata->pkt_info.src_port, +- (int)tmp.slen, tmp.ptr, ++ (int)tmp.slen, tmp.ptr)); ++ PJ_LOG(4, (THIS_FILE, ++ "Dropped packet:" ++ "%.*s\n" ++ "-- end of packet.", + (int)msg_fragment_size, + rdata->msg_info.msg_buf)); + } -- cgit From 404a50b42f26f99d89831d74ac383fd85ebbf138 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Fri, 5 Jan 2024 23:34:56 +0100 Subject: asterisk: bump to 18.20.2 - Resolves GHSA-98rc-4j27-74hh, GHSA-hxj9-xwr8-w8pq, GHSA-5743-x3p5-3rg7 and GHSA-8857-hfmw-vg8f - patches refreshed - patch 180-app_queue_time_t.patch added to fix new warnings - 180-chan_iax2.c-Avoid-crash-with-IAX2-switch-support.patch removed as it's included in upstream release tar ball. Signed-off-by: Sebastian Kemper --- net/asterisk/Makefile | 6 +++--- .../patches/030-GNU-GLOB-exts-only-on-glibc.patch | 4 ++-- net/asterisk/patches/130-eventfd.patch | 2 +- net/asterisk/patches/140-use-default-lua.patch | 2 +- net/asterisk/patches/180-app_queue_time_t.patch | 17 +++++++++++++++ ...x2.c-Avoid-crash-with-IAX2-switch-support.patch | 25 ---------------------- 6 files changed, 24 insertions(+), 32 deletions(-) create mode 100644 net/asterisk/patches/180-app_queue_time_t.patch delete mode 100644 net/asterisk/patches/180-chan_iax2.c-Avoid-crash-with-IAX2-switch-support.patch diff --git a/net/asterisk/Makefile b/net/asterisk/Makefile index d670e8b..743c937 100644 --- a/net/asterisk/Makefile +++ b/net/asterisk/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk -PKG_VERSION:=18.15.1 -PKG_RELEASE:=3 +PKG_VERSION:=18.20.2 +PKG_RELEASE:=1 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases -PKG_HASH:=7594b045e1979a6e80f07ecfff634204830917fd2a7686b161cf4849454f4531 +PKG_HASH:=7ee8499fc704e5fcae57c5f195f806f2ce4da7ae5f62faa43e73b3e6d218747f PKG_BUILD_DEPENDS:=libxml2/host diff --git a/net/asterisk/patches/030-GNU-GLOB-exts-only-on-glibc.patch b/net/asterisk/patches/030-GNU-GLOB-exts-only-on-glibc.patch index f6289a6..0dad203 100644 --- a/net/asterisk/patches/030-GNU-GLOB-exts-only-on-glibc.patch +++ b/net/asterisk/patches/030-GNU-GLOB-exts-only-on-glibc.patch @@ -1,6 +1,6 @@ --- a/res/ael/ael.flex +++ b/res/ael/ael.flex -@@ -601,7 +601,7 @@ includes { STORE_POS; return KW_INCLUDES +@@ -598,7 +598,7 @@ includes { STORE_POS; return KW_INCLUDES snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf); ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf)); } @@ -11,7 +11,7 @@ glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf); --- a/res/ael/ael_lex.c +++ b/res/ael/ael_lex.c -@@ -1982,7 +1982,7 @@ YY_RULE_SETUP +@@ -1966,7 +1966,7 @@ YY_RULE_SETUP snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf); ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf)); } diff --git a/net/asterisk/patches/130-eventfd.patch b/net/asterisk/patches/130-eventfd.patch index b14ec04..f06dec2 100644 --- a/net/asterisk/patches/130-eventfd.patch +++ b/net/asterisk/patches/130-eventfd.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -1262,7 +1262,7 @@ if test "${ac_cv_have_variable_fdset}x" +@@ -1264,7 +1264,7 @@ if test "${ac_cv_have_variable_fdset}x" fi AC_MSG_CHECKING([if we have usable eventfd support]) diff --git a/net/asterisk/patches/140-use-default-lua.patch b/net/asterisk/patches/140-use-default-lua.patch index 2dbfd4f..8fa0c6f 100644 --- a/net/asterisk/patches/140-use-default-lua.patch +++ b/net/asterisk/patches/140-use-default-lua.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -2625,7 +2625,7 @@ if test -z "$__opus_include" -o x"$__opu +@@ -2634,7 +2634,7 @@ if test -z "$__opus_include" -o x"$__opu fi AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include]) diff --git a/net/asterisk/patches/180-app_queue_time_t.patch b/net/asterisk/patches/180-app_queue_time_t.patch new file mode 100644 index 0000000..d582a39 --- /dev/null +++ b/net/asterisk/patches/180-app_queue_time_t.patch @@ -0,0 +1,17 @@ +--- a/apps/app_queue.c ++++ b/apps/app_queue.c +@@ -4614,8 +4614,12 @@ static int is_longest_waiting_caller(str + * will be unused until the first caller is picked up. + */ + if (ch->start < caller->start && !ch->pending) { +- ast_debug(1, "Queue %s has a call at position %i that's been waiting longer (%li vs %li)\n", +- q->name, ch->pos, ch->start, caller->start); ++ char time1[AST_TIME_T_LEN]; ++ char time2[AST_TIME_T_LEN]; ++ ast_time_t_to_string(ch->start, time1, sizeof(time1)); ++ ast_time_t_to_string(caller->start, time2, sizeof(time2)); ++ ast_debug(1, "Queue %s has a call at position %i that's been waiting longer (%s vs %s)\n", ++ q->name, ch->pos, time1, time2); + is_longest_waiting = 0; + break; + } diff --git a/net/asterisk/patches/180-chan_iax2.c-Avoid-crash-with-IAX2-switch-support.patch b/net/asterisk/patches/180-chan_iax2.c-Avoid-crash-with-IAX2-switch-support.patch deleted file mode 100644 index 52a4dd5..0000000 --- a/net/asterisk/patches/180-chan_iax2.c-Avoid-crash-with-IAX2-switch-support.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 39912b91384b4a6a4b4b34cdd338970c184fb096 Mon Sep 17 00:00:00 2001 -From: Sean Bright -Date: Fri, 7 Jul 2023 15:57:39 -0400 -Subject: [PATCH] chan_iax2.c: Avoid crash with IAX2 switch support. - -A change made in 82cebaa0 did not properly handle the case when a -channel was not provided, triggering a crash. ast_check_hangup(...) -does not protect against NULL pointers. - -Fixes #180 ---- - channels/chan_iax2.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/channels/chan_iax2.c -+++ b/channels/chan_iax2.c -@@ -14312,7 +14312,7 @@ static struct iax2_dpcache *find_cache(s - ast_log(LOG_WARNING, "Timeout waiting for %s exten %s\n", data, exten); - } - -- if (ast_check_hangup(chan)) { -+ if (chan && ast_check_hangup(chan)) { - doabort = 1; - } - -- cgit