]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Revert "asterisk addon: update to 11.10.2" due tls/srtp not working stable
authorDirk Wagner <dirk.wagner@ipfire.org>
Tue, 8 Jul 2014 19:01:02 +0000 (21:01 +0200)
committerDirk Wagner <dirk.wagner@ipfire.org>
Tue, 8 Jul 2014 19:01:02 +0000 (21:01 +0200)
This reverts commit dc0657f58ff58acd2dafe24f28b5af706e91c3f9.

lfs/asterisk
src/patches/asterisk-ssl-reader-should-block.patch [new file with mode: 0644]

index bee815ec1c10e34f19ddc975226d9951aa0a001e..b52c680e3bc972c1de2c039688f585a07bc96a1d 100755 (executable)
@@ -20,7 +20,7 @@
 
 include Config
 
-VER        = 11.10.2
+VER        = 11.10.0
 
 THISAPP    = asterisk-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -28,7 +28,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = asterisk
-PAK_VER    = 12
+PAK_VER    = 11
 
 DEPS       = "sqlite"
 
@@ -48,7 +48,7 @@ asterisk-extra-sounds-en-gsm-1.4.14.tar.gz = $(URL_IPFIRE)/asterisk-extra-sounds
 asterisk-moh-opsound-gsm-2.03.tar.gz = $(URL_IPFIRE)/asterisk-moh-opsound-gsm-2.03.tar.gz
 asterisk-1.4-de-prompts.tar.gz = $(URL_IPFIRE)/asterisk-1.4-de-prompts.tar.gz
 
-$(DL_FILE)_MD5 = 142691ceabdf4cd378a9725419215bd2
+$(DL_FILE)_MD5 = 47384cd1ff48b306dca6e03027b023bd
 libsrtp-1.4.5-99426a54.tar.gz_MD5 = 05bfbe63a2a27343889c2436c836110a
 asterisk-extra-sounds-en-gsm-1.4.14.tar.gz_MD5 = ffc2e0ffd783c03fef5b75277dba0896
 asterisk-moh-opsound-gsm-2.03.tar.gz_MD5 = 09066f55f1358f298bc1a6e4678a3ddf
@@ -94,6 +94,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 
        # patch asterisk
        cd $(DIR_APP) && patch -p4 < $(DIR_SRC)/src/patches/asterisk-no-ffmpeg.patch
+       cd $(DIR_APP) && patch -p1 < $(DIR_SRC)/src/patches/asterisk-ssl-reader-should-block.patch      
 
        # configure asterisk
        cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/var/ipfire \
diff --git a/src/patches/asterisk-ssl-reader-should-block.patch b/src/patches/asterisk-ssl-reader-should-block.patch
new file mode 100644 (file)
index 0000000..3b2f0ed
--- /dev/null
@@ -0,0 +1,28 @@
+Upstream issue 18345
+Link: https://issues.asterisk.org/jira/browse/ASTERISK-18345
+Patch-By: Filip Jenicek
+
+Submitted upstream:   2012-05-31 09:12
+For Asterisk version: 1.8.4
+
+The HOOK_T ssl_read function should behave the same way as the system read function 
+by blocking and waiting for (more) data from the SSL subsystem. Failure to do this 
+will drop data on the floor and ultimately disconnect SSL clients.
+
+--- asterisk/main/tcptls.c
++++ asterisk/main/tcptls.c
+@@ -55,6 +55,14 @@
+ static HOOK_T ssl_read(void *cookie, char *buf, LEN_T len)
+ {
+       int i = SSL_read(cookie, buf, len-1);
++
++      /* ssl_read should block and wait for the SSL layer to provide all data */
++      while (i < 0 && SSL_get_error(cookie, i) == SSL_ERROR_WANT_READ) {
++              ast_debug(1, "SSL_read - data not ready.\n");
++              if (ast_wait_for_input(SSL_get_fd(cookie), 5000) <= 0) return 0;
++              i = SSL_read(cookie, buf, len-1);
++      }
++
+ #if 0
+       if (i >= 0)
+               buf[i] = '\0';