From: <abe...@us...> - 2016-02-26 16:53:18
|
Revision: 7560 http://sourceforge.net/p/astlinux/code/7560 Author: abelbeck Date: 2016-02-26 16:53:16 +0000 (Fri, 26 Feb 2016) Log Message: ----------- pjsip, use custom config for Asterisk Ref: https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+pjproject Modified Paths: -------------- branches/1.0/package/pjsip/pjsip.mk Added Paths: ----------- branches/1.0/package/pjsip/asterisk-config_site.h Added: branches/1.0/package/pjsip/asterisk-config_site.h =================================================================== --- branches/1.0/package/pjsip/asterisk-config_site.h (rev 0) +++ branches/1.0/package/pjsip/asterisk-config_site.h 2016-02-26 16:53:16 UTC (rev 7560) @@ -0,0 +1,43 @@ +/* Custom config for Asterisk + * + * https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+pjproject + * + */ + +#define NDEBUG 1 +#define PJ_HAS_IPV6 1 +#define PJ_MAX_HOSTNAME 256 +#define PJSIP_MAX_URL_SIZE 512 + +/* The upper limit on MAX_HANDLES is determined by + * the value of FD_SETSIZE on your system. For Linux + * this is usually 1024. The following code sets it + * to whatever FD_SETSIZE is or you can set it to a + * specific number yourself. pjproject will not + * compile if you set it to greater than FD_SETSIZE. + */ +#include <sys/select.h> +#define PJ_IOQUEUE_MAX_HANDLES (FD_SETSIZE) + +/* Set for maximum server performance. + * In tests, setting these parameters reduced + * CPU load by approximately 25% for the same number + * of calls per second. Your results will vary, + * of course. + */ +#define PJ_SCANNER_USE_BITWISE 0 +#define PJ_OS_HAS_CHECK_STACK 0 +#define PJ_LOG_MAX_LEVEL 3 +#define PJ_ENABLE_EXTRA_CHECK 0 +#define PJSIP_MAX_TSX_COUNT ((64*1024)-1) +#define PJSIP_MAX_DIALOG_COUNT ((64*1024)-1) +#define PJSIP_UDP_SO_SNDBUF_SIZE (512*1024) +#define PJSIP_UDP_SO_RCVBUF_SIZE (512*1024) +#define PJ_DEBUG 0 +#define PJSIP_SAFE_MODULE 0 +#define PJ_HAS_STRICMP_ALNUM 0 +#define PJ_HASH_USE_OWN_TOLOWER 1 +#define PJSIP_UNESCAPE_IN_PLACE 1 +#undef PJ_TODO +#define PJ_TODO(x) + Modified: branches/1.0/package/pjsip/pjsip.mk =================================================================== --- branches/1.0/package/pjsip/pjsip.mk 2016-02-26 14:41:37 UTC (rev 7559) +++ branches/1.0/package/pjsip/pjsip.mk 2016-02-26 16:53:16 UTC (rev 7560) @@ -11,8 +11,13 @@ PJSIP_DEPENDENCIES = libsrtp +define PJSIP_CUSTOM_CONFIG + cp package/pjsip/asterisk-config_site.h $(@D)/pjlib/include/pj/config_site.h +endef +PJSIP_POST_PATCH_HOOKS += PJSIP_CUSTOM_CONFIG + PJSIP_CONF_ENV = \ - CFLAGS="$(TARGET_CFLAGS) -O2 -DPJ_HAS_IPV6=1 -DNDEBUG" \ + CFLAGS="$(TARGET_CFLAGS) -O2" \ LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ LD="$(TARGET_CC)" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2016-07-21 20:57:07
|
Revision: 7768 http://sourceforge.net/p/astlinux/code/7768 Author: abelbeck Date: 2016-07-21 20:57:04 +0000 (Thu, 21 Jul 2016) Log Message: ----------- pjsip, version bump to 2.5 Modified Paths: -------------- branches/1.0/package/pjsip/pjsip.mk Added Paths: ----------- branches/1.0/package/pjsip/pjsip-0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch branches/1.0/package/pjsip/pjsip-0002-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch Removed Paths: ------------- branches/1.0/package/pjsip/pjsip-0001-sip_parser.c-Fix-pjsip_VIA_PARAM_SPEC_ESC.patch Added: branches/1.0/package/pjsip/pjsip-0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch =================================================================== --- branches/1.0/package/pjsip/pjsip-0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch (rev 0) +++ branches/1.0/package/pjsip/pjsip-0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch 2016-07-21 20:57:04 UTC (rev 7768) @@ -0,0 +1,72 @@ +From a5030c9b33b2c936879fbacb1d2ea5edc2979181 Mon Sep 17 00:00:00 2001 +From: George Joseph <gj...@di...> +Date: Sat, 18 Jun 2016 10:14:34 -0600 +Subject: [PATCH] evsub: Add APIs to add/decrement an event subscription's + group lock + +These APIs can be used to ensure that the evsub isn't destroyed before +an application is finished using it. +--- + pjsip/include/pjsip-simple/evsub.h | 20 ++++++++++++++++++++ + pjsip/src/pjsip-simple/evsub.c | 14 ++++++++++++++ + 2 files changed, 34 insertions(+) + +diff --git a/pjsip/include/pjsip-simple/evsub.h b/pjsip/include/pjsip-simple/evsub.h +index 2dc4d69..31f85f8 100644 +--- a/pjsip/include/pjsip-simple/evsub.h ++++ b/pjsip/include/pjsip-simple/evsub.h +@@ -490,6 +490,26 @@ PJ_DECL(void) pjsip_evsub_set_mod_data( pjsip_evsub *sub, unsigned mod_id, + PJ_DECL(void*) pjsip_evsub_get_mod_data( pjsip_evsub *sub, unsigned mod_id ); + + ++/** ++ * Increment the event subscription's group lock. ++ * ++ * @param sub The server subscription instance. ++ * ++ * @return PJ_SUCCESS on success. ++ */ ++PJ_DEF(pj_status_t) pjsip_evsub_add_ref(pjsip_evsub *sub); ++ ++ ++/** ++ * Decrement the event subscription's group lock. ++ * ++ * @param sub The server subscription instance. ++ * ++ * @return PJ_SUCCESS on success. ++ */ ++PJ_DEF(pj_status_t) pjsip_evsub_dec_ref(pjsip_evsub *sub); ++ ++ + + PJ_END_DECL + +diff --git a/pjsip/src/pjsip-simple/evsub.c b/pjsip/src/pjsip-simple/evsub.c +index 7cd8859..68a9564 100644 +--- a/pjsip/src/pjsip-simple/evsub.c ++++ b/pjsip/src/pjsip-simple/evsub.c +@@ -831,7 +831,21 @@ static pj_status_t evsub_create( pjsip_dialog *dlg, + return PJ_SUCCESS; + } + ++/* ++ * Increment the event subscription's group lock. ++ */ ++PJ_DEF(pj_status_t) pjsip_evsub_add_ref(pjsip_evsub *sub) ++{ ++ return pj_grp_lock_add_ref(sub->grp_lock); ++} + ++/* ++ * Decrement the event subscription's group lock. ++ */ ++PJ_DEF(pj_status_t) pjsip_evsub_dec_ref(pjsip_evsub *sub) ++{ ++ return pj_grp_lock_dec_ref(sub->grp_lock); ++} + + /* + * Create client subscription session. +-- +2.5.5 Deleted: branches/1.0/package/pjsip/pjsip-0001-sip_parser.c-Fix-pjsip_VIA_PARAM_SPEC_ESC.patch =================================================================== --- branches/1.0/package/pjsip/pjsip-0001-sip_parser.c-Fix-pjsip_VIA_PARAM_SPEC_ESC.patch 2016-07-21 18:16:49 UTC (rev 7767) +++ branches/1.0/package/pjsip/pjsip-0001-sip_parser.c-Fix-pjsip_VIA_PARAM_SPEC_ESC.patch 2016-07-21 20:57:04 UTC (rev 7768) @@ -1,29 +0,0 @@ -From 0fc7ef5f01be9cc74d184c3ca3a973ff1ef44c93 Mon Sep 17 00:00:00 2001 -From: George Joseph <geo...@fa...> -Date: Sun, 10 Apr 2016 12:54:06 -0600 -Subject: [PATCH] sip_parser.c: Fix pjsip_VIA_PARAM_SPEC_ESC - -pjsip_VIA_PARAM_SPEC_ESC should have been pjsip_TOKEN_SPEC_ESC + ":" but -instead of appending ":" to pjsip_VIA_PARAM_SPEC_ESC it was being appended -to pjsip_VIA_PARAM_SPEC again. This was causing parsing of Via headers -to fail when an ipv6 address was in a "received" param and -PJSIP_UNESCAPE_IN_PLACE was used. Probably just a copy/paste error. ---- - pjsip/src/pjsip/sip_parser.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pjsip/src/pjsip/sip_parser.c b/pjsip/src/pjsip/sip_parser.c -index 378c22f..c18faa3 100644 ---- a/pjsip/src/pjsip/sip_parser.c -+++ b/pjsip/src/pjsip/sip_parser.c -@@ -327,7 +327,7 @@ static pj_status_t init_parser() - - status = pj_cis_dup(&pconst.pjsip_VIA_PARAM_SPEC_ESC, &pconst.pjsip_TOKEN_SPEC_ESC); - PJ_ASSERT_RETURN(status == PJ_SUCCESS, status); -- pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC, ":"); -+ pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC_ESC, ":"); - - status = pj_cis_dup(&pconst.pjsip_HOST_SPEC, &pconst.pjsip_ALNUM_SPEC); - PJ_ASSERT_RETURN(status == PJ_SUCCESS, status); --- -2.5.5 Added: branches/1.0/package/pjsip/pjsip-0002-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch =================================================================== --- branches/1.0/package/pjsip/pjsip-0002-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch (rev 0) +++ branches/1.0/package/pjsip/pjsip-0002-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch 2016-07-21 20:57:04 UTC (rev 7768) @@ -0,0 +1,47 @@ +From b7cb93b0e1729589a71e8b30d9a9893f0918e2a2 Mon Sep 17 00:00:00 2001 +From: George Joseph <geo...@fa...> +Date: Mon, 30 May 2016 11:58:22 -0600 +Subject: [PATCH] sip_transport_tcp/tls: Set factory on transports created + from accept + +The ability to re-use tcp and tls transports when a factory is +specified now depends on transport->factory being set which is a new field +in 2.5. This was being set only on new outgoing sockets not on +incoming sockets. The result was that a client REGISTER created a new +socket but without the factory set, the next outgoing request to the +client, OPTIONS, INVITE, etc, would attempt to create another socket +which the client would refuse. + +This patch sets the factory on transports created as a result of an +accept. +--- + pjsip/src/pjsip/sip_transport_tcp.c | 1 + + pjsip/src/pjsip/sip_transport_tls.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/pjsip/src/pjsip/sip_transport_tcp.c b/pjsip/src/pjsip/sip_transport_tcp.c +index 1bbb324..00eb8fc 100644 +--- a/pjsip/src/pjsip/sip_transport_tcp.c ++++ b/pjsip/src/pjsip/sip_transport_tcp.c +@@ -713,6 +713,7 @@ static pj_status_t tcp_create( struct tcp_listener *listener, + tcp->base.send_msg = &tcp_send_msg; + tcp->base.do_shutdown = &tcp_shutdown; + tcp->base.destroy = &tcp_destroy_transport; ++ tcp->base.factory = &listener->factory; + + /* Create group lock */ + status = pj_grp_lock_create(pool, NULL, &tcp->grp_lock); +diff --git a/pjsip/src/pjsip/sip_transport_tls.c b/pjsip/src/pjsip/sip_transport_tls.c +index a83ac32..36ee70d 100644 +--- a/pjsip/src/pjsip/sip_transport_tls.c ++++ b/pjsip/src/pjsip/sip_transport_tls.c +@@ -742,6 +742,7 @@ static pj_status_t tls_create( struct tls_listener *listener, + tls->base.send_msg = &tls_send_msg; + tls->base.do_shutdown = &tls_shutdown; + tls->base.destroy = &tls_destroy_transport; ++ tls->base.factory = &listener->factory; + + tls->ssock = ssock; + +-- +2.5.5 Modified: branches/1.0/package/pjsip/pjsip.mk =================================================================== --- branches/1.0/package/pjsip/pjsip.mk 2016-07-21 18:16:49 UTC (rev 7767) +++ branches/1.0/package/pjsip/pjsip.mk 2016-07-21 20:57:04 UTC (rev 7768) @@ -4,7 +4,7 @@ # ################################################################################ -PJSIP_VERSION = 2.4.5 +PJSIP_VERSION = 2.5 PJSIP_SOURCE = pjproject-$(PJSIP_VERSION).tar.bz2 PJSIP_SITE = http://www.pjsip.org/release/$(PJSIP_VERSION) PJSIP_INSTALL_STAGING = YES This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2017-05-20 04:20:16
|
Revision: 8308 http://sourceforge.net/p/astlinux/code/8308 Author: abelbeck Date: 2017-05-20 04:20:15 +0000 (Sat, 20 May 2017) Log Message: ----------- pjsip, add Asterisk 13.15.1 patches including security fixes: AST-2017-002 and AST-2017-003 Added Paths: ----------- branches/1.0/package/pjsip/pjsip-0014-Add-pjsip-transport-register-type-ipv6.patch branches/1.0/package/pjsip/pjsip-0025-fix-print-xml-crash.patch branches/1.0/package/pjsip/pjsip-0058-Parse-zero-length-multipart-body-parts-correctly.patch branches/1.0/package/pjsip/pjsip-0059-Ensure-2543-transaction-key-buffer-is-large-enough.patch Added: branches/1.0/package/pjsip/pjsip-0014-Add-pjsip-transport-register-type-ipv6.patch =================================================================== --- branches/1.0/package/pjsip/pjsip-0014-Add-pjsip-transport-register-type-ipv6.patch (rev 0) +++ branches/1.0/package/pjsip/pjsip-0014-Add-pjsip-transport-register-type-ipv6.patch 2017-05-20 04:20:15 UTC (rev 8308) @@ -0,0 +1,62 @@ +From daeb0956524606b597704a90b54d81340e10b3e4 Mon Sep 17 00:00:00 2001 +From: Joshua Colp <jc...@di...> +Date: Tue, 7 Mar 2017 12:32:49 +0000 +Subject: [PATCH] Add support for registering IPv6 transport type. + +This change allows an IPv6 transport type to be registered +and used. The IPv4 transport is found (if available) and the +IPv4 flag added to its type to match how the finding of +IPv6 transport types works. +--- + pjsip/src/pjsip/sip_transport.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/pjsip/src/pjsip/sip_transport.c b/pjsip/src/pjsip/sip_transport.c +index 7df6138..ce72814 100644 +--- a/pjsip/src/pjsip/sip_transport.c ++++ b/pjsip/src/pjsip/sip_transport.c +@@ -253,6 +253,7 @@ PJ_DEF(pj_status_t) pjsip_transport_register_type( unsigned tp_flag, + int *p_tp_type) + { + unsigned i; ++ pjsip_transport_type_e parent = 0; + + PJ_ASSERT_RETURN(tp_flag && tp_name && def_port, PJ_EINVAL); + PJ_ASSERT_RETURN(pj_ansi_strlen(tp_name) < +@@ -260,6 +261,11 @@ PJ_DEF(pj_status_t) pjsip_transport_register_type( unsigned tp_flag, + PJ_ENAMETOOLONG); + + for (i=1; i<PJ_ARRAY_SIZE(transport_names); ++i) { ++ if (tp_flag & PJSIP_TRANSPORT_IPV6 && ++ pj_stricmp2(&transport_names[i].name, tp_name) == 0) ++ { ++ parent = transport_names[i].type; ++ } + if (transport_names[i].type == 0) + break; + } +@@ -267,14 +273,19 @@ PJ_DEF(pj_status_t) pjsip_transport_register_type( unsigned tp_flag, + if (i == PJ_ARRAY_SIZE(transport_names)) + return PJ_ETOOMANY; + +- transport_names[i].type = (pjsip_transport_type_e)i; ++ if (tp_flag & PJSIP_TRANSPORT_IPV6 && parent) { ++ transport_names[i].type = parent | PJSIP_TRANSPORT_IPV6; ++ } else { ++ transport_names[i].type = (pjsip_transport_type_e)i; ++ } ++ + transport_names[i].port = (pj_uint16_t)def_port; + pj_ansi_strcpy(transport_names[i].name_buf, tp_name); + transport_names[i].name = pj_str(transport_names[i].name_buf); + transport_names[i].flag = tp_flag; + + if (p_tp_type) +- *p_tp_type = i; ++ *p_tp_type = transport_names[i].type; + + return PJ_SUCCESS; + } +-- +2.7.4 + Added: branches/1.0/package/pjsip/pjsip-0025-fix-print-xml-crash.patch =================================================================== --- branches/1.0/package/pjsip/pjsip-0025-fix-print-xml-crash.patch (rev 0) +++ branches/1.0/package/pjsip/pjsip-0025-fix-print-xml-crash.patch 2017-05-20 04:20:15 UTC (rev 8308) @@ -0,0 +1,24 @@ +From 1bc5ca699f523bd8e910203a3eb4dee58f366976 Mon Sep 17 00:00:00 2001 +From: Joshua Elson <jos...@gm...> +Date: Mon, 20 Mar 2017 19:28:47 -0600 +Subject: [PATCH] Prevent memory corruption on xml tag write + +--- + pjlib-util/src/pjlib-util/xml.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/pjlib-util/src/pjlib-util/xml.c b/pjlib-util/src/pjlib-util/xml.c +index 296b232..b0aad26 100644 +--- a/pjlib-util/src/pjlib-util/xml.c ++++ b/pjlib-util/src/pjlib-util/xml.c +@@ -248,6 +248,7 @@ static int xml_print_node( const pj_xml_node *node, int indent, + if (node->content.slen==0 && + node->node_head.next==(pj_xml_node*)&node->node_head) + { ++ if (SIZE_LEFT() < 3) return -1; + *p++ = ' '; + *p++ = '/'; + *p++ = '>'; +-- +2.10.1 (Apple Git-78) + Added: branches/1.0/package/pjsip/pjsip-0058-Parse-zero-length-multipart-body-parts-correctly.patch =================================================================== --- branches/1.0/package/pjsip/pjsip-0058-Parse-zero-length-multipart-body-parts-correctly.patch (rev 0) +++ branches/1.0/package/pjsip/pjsip-0058-Parse-zero-length-multipart-body-parts-correctly.patch 2017-05-20 04:20:15 UTC (rev 8308) @@ -0,0 +1,41 @@ +From f0c717463d569f87a16f9b014033c8ca8939a7b4 Mon Sep 17 00:00:00 2001 +From: Mark Michelson <mmi...@di...> +Date: Thu, 13 Apr 2017 16:59:40 -0500 +Subject: [PATCH] Parse zero-length multipart body parts correctly. + +The calculation of end_body could result in a negative length being +passed to multipart_body_parse_part(). +--- + pjsip/src/pjsip/sip_multipart.c | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +diff --git a/pjsip/src/pjsip/sip_multipart.c b/pjsip/src/pjsip/sip_multipart.c +index 8351f7e..b302139 100644 +--- a/pjsip/src/pjsip/sip_multipart.c ++++ b/pjsip/src/pjsip/sip_multipart.c +@@ -646,13 +646,15 @@ PJ_DEF(pjsip_msg_body*) pjsip_multipart_parse(pj_pool_t *pool, + + end_body = curptr; + +- /* The newline preceeding the delimiter is conceptually part of +- * the delimiter, so trim it from the body. +- */ +- if (*(end_body-1) == '\n') +- --end_body; +- if (*(end_body-1) == '\r') +- --end_body; ++ if (end_body > start_body) { ++ /* The newline preceeding the delimiter is conceptually part of ++ * the delimiter, so trim it from the body. ++ */ ++ if (*(end_body-1) == '\n') ++ --end_body; ++ if (*(end_body-1) == '\r') ++ --end_body; ++ } + + /* Now that we have determined the part's boundary, parse it + * to get the header and body part of the part. +-- +1.9.1 + Added: branches/1.0/package/pjsip/pjsip-0059-Ensure-2543-transaction-key-buffer-is-large-enough.patch =================================================================== --- branches/1.0/package/pjsip/pjsip-0059-Ensure-2543-transaction-key-buffer-is-large-enough.patch (rev 0) +++ branches/1.0/package/pjsip/pjsip-0059-Ensure-2543-transaction-key-buffer-is-large-enough.patch 2017-05-20 04:20:15 UTC (rev 8308) @@ -0,0 +1,29 @@ +From b5f0f8868363c482a2c4ce343e3ee6ad256b0708 Mon Sep 17 00:00:00 2001 +From: Mark Michelson <mmi...@di...> +Date: Thu, 13 Apr 2017 16:20:07 -0500 +Subject: [PATCH] Ensure 2543 transaction key buffer is large enough. + +The CSeq method length needs to be factored into the allocated buffer +length. Otherwise, the buffer may not be large enough to accommodate the +entire key. +--- + pjsip/src/pjsip/sip_transaction.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/pjsip/src/pjsip/sip_transaction.c b/pjsip/src/pjsip/sip_transaction.c +index c1750dc..2200d8d 100644 +--- a/pjsip/src/pjsip/sip_transaction.c ++++ b/pjsip/src/pjsip/sip_transaction.c +@@ -288,7 +288,8 @@ static pj_status_t create_tsx_key_2543( pj_pool_t *pool, + host = &rdata->msg_info.via->sent_by.host; + + /* Calculate length required. */ +- len_required = 9 + /* CSeq number */ ++ len_required = method->name.slen + /* Method */ ++ 9 + /* CSeq number */ + rdata->msg_info.from->tag.slen + /* From tag. */ + rdata->msg_info.cid->id.slen + /* Call-ID */ + host->slen + /* Via host. */ +-- +1.9.1 + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |