[Pkg-voip-commits] r10128 - in /asterisk/trunk/debian: changelog patches/bluetooth_bind
tzafrir at alioth.debian.org
tzafrir at alioth.debian.org
Sat Apr 6 10:59:06 UTC 2013
Author: tzafrir
Date: Sat Apr 6 10:59:06 2013
New Revision: 10128
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=10128
Log:
Patch bluetooth_bind - fix breakage of chan_mobile (Closes: #614786).
Added:
asterisk/trunk/debian/patches/bluetooth_bind
Modified:
asterisk/trunk/debian/changelog
Modified: asterisk/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/changelog?rev=10128&op=diff
==============================================================================
--- asterisk/trunk/debian/changelog (original)
+++ asterisk/trunk/debian/changelog Sat Apr 6 10:59:06 2013
@@ -16,6 +16,7 @@
a large POST.
- Patch AST-2013-003 (CVE-2012-2264): Prevent username disclosure in
SIP channel driver.
+ * Patch bluetooth_bind - fix breakage of chan_mobile (Closes: #614786).
-- Tzafrir Cohen <tzafrir at debian.org> Tue, 08 Jan 2013 00:06:09 +0200
Added: asterisk/trunk/debian/patches/bluetooth_bind
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bluetooth_bind?rev=10128&op=file
==============================================================================
--- asterisk/trunk/debian/patches/bluetooth_bind (added)
+++ asterisk/trunk/debian/patches/bluetooth_bind Sat Apr 6 10:59:06 2013
@@ -1,0 +1,35 @@
+From: Matthew Jordan <mjordan at digium.com>
+Date: Thu, 17 Jan 2013 02:28:31 +0000
+Subject: Fix issue where chan_mobile fails to bind to first available port
+Bug: https://issues.asterisk.org/jira/browse/ASTERISK-16357
+Origin: http://svnview.digium.com/svn/asterisk?view=rev&rev=379342
+
+Per the bluez API, in order to bind to the first available port, the rc_channel
+field of the socket addressing structure used to bind the socket should be set
+to 0. Previously, Asterisk had set the rc_channel field set to 1, causing it
+to connect to whatever happens to be on port 1.
+
+We could probably not explicitly set rc_channel to 0 since we memset the struct
+earlier, but explicitly setting it will hopefully prevent someone from coming
+in and setting it to some explicit port in the future.
+
+---
+ addons/chan_mobile.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/addons/chan_mobile.c b/addons/chan_mobile.c
+index c4779ea..81f2d2d 100644
+--- a/addons/chan_mobile.c
++++ b/addons/chan_mobile.c
+@@ -1371,7 +1371,7 @@ static int rfcomm_connect(bdaddr_t src, bdaddr_t dst, int remote_channel)
+ memset(&addr, 0, sizeof(addr));
+ addr.rc_family = AF_BLUETOOTH;
+ bacpy(&addr.rc_bdaddr, &src);
+- addr.rc_channel = (uint8_t) 1;
++ addr.rc_channel = (uint8_t) 0;
+ if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
+ ast_debug(1, "bind() failed (%d).\n", errno);
+ close(s);
+--
+1.7.10.4
+
More information about the Pkg-voip-commits
mailing list