[asterisk-commits] res pjsip/config transport: Prevent async operations > 1 whe... (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Dec 8 13:18:08 CST 2015
Joshua Colp has submitted this change and it was merged.
Change subject: res_pjsip/config_transport: Prevent async_operations > 1 when protocol = tls
......................................................................
res_pjsip/config_transport: Prevent async_operations > 1 when protocol = tls
See ASTERISK-25615.
If the transport protocol is tls and async_operations > 1, pjproject
will segfault if more than one operation is attempted on the same socket.
Until this is fixed upstream, a check has been added to throw an error
if a tls transport config has async_operations set to > 1.
ASTERISK-25615
Change-Id: I76b9a5b2a5a0054fe71ca5851e635f2dca7685a6
Reported-by: George Joseph
Tested-by: George Joseph
---
M res/res_pjsip/config_transport.c
1 file changed, 8 insertions(+), 0 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c
index e998661..e2f0c7f 100644
--- a/res/res_pjsip/config_transport.c
+++ b/res/res_pjsip/config_transport.c
@@ -216,6 +216,14 @@
res = pjsip_tcp_transport_start3(ast_sip_get_pjsip_endpoint(), &cfg, &transport->state->factory);
} else if (transport->type == AST_TRANSPORT_TLS) {
+ /* The following check is a work-around for ASTERISK-25615.
+ * When that issue is resolved in upstream pjproject, this check can be removed.
+ */
+ if (transport->async_operations > 1) {
+ ast_log(LOG_ERROR, "Transport: %s: When protocol=tls, async_operations can't be > 1 (ASTERISK-25615)\n",
+ ast_sorcery_object_get_id(obj));
+ return -1;
+ }
transport->tls.ca_list_file = pj_str((char*)transport->ca_list_file);
#ifdef HAVE_PJ_SSL_CERT_LOAD_FROM_FILES2
transport->tls.ca_list_path = pj_str((char*)transport->ca_list_path);
--
To view, visit https://gerrit.asterisk.org/1786
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I76b9a5b2a5a0054fe71ca5851e635f2dca7685a6
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
More information about the asterisk-commits
mailing list