include $(TOPDIR)/rules.mk
PKG_NAME:=libosip2
-PKG_VERSION:=5.1.2
-PKG_RELEASE:=1
+PKG_VERSION:=5.3.0
+PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/osip
-PKG_HASH:=2bc0400f21a64cf4f2cbc9827bf8bdbb05a9b52ecc8e791b4ec0f1f9410c1291
+PKG_HASH:=f4725916c22cf514969efb15c3c207233d64739383f7d42956038b78f6cae8c8
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
CATEGORY:=Libraries
TITLE:=GNU oSIP library
URL:=http://www.gnu.org/software/osip/
- ABI_VERSION:=13
+ ABI_VERSION:=15
DEPENDS:=+librt
endef
PKG_NAME:=libpri
PKG_VERSION:=1.6.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/libpri/releases
Lucent 5E Custom protocols on switches from Nortel and Lucent.
endef
+MAKE_FLAGS += \
+ OSARCH=Linux \
+ LDCONFIG=ldconfig
+
define Build/Configure
endef
-Index: libpri-1.4.15/pritest.c
-===================================================================
---- libpri-1.4.15.orig/pritest.c
-+++ libpri-1.4.15/pritest.c
+--- a/pritest.c
++++ b/pritest.c
@@ -41,7 +41,7 @@
#include <sys/ioctl.h>
#include <stdlib.h>
#include <sys/select.h>
#include <sys/wait.h>
#include <sys/resource.h>
-Index: libpri-1.4.15/testprilib.c
-===================================================================
---- libpri-1.4.15.orig/testprilib.c
-+++ libpri-1.4.15/testprilib.c
+--- a/testprilib.c
++++ b/testprilib.c
@@ -41,7 +41,7 @@
#include <sys/ioctl.h>
#include <stdlib.h>
--- /dev/null
+Upstream issue: https://issues.asterisk.org/jira/browse/PRI-188
+
+From ec1d6589c6e4eb6550cb92d5e0f214f7b31e8d5f Mon Sep 17 00:00:00 2001
+From: "Sergey V. Lobanov" <sergey@lobanov.in>
+Date: Sun, 30 Jan 2022 13:25:17 +0300
+Subject: [PATCH] Add an ability to build libpri on MacOS for Linux target
+
+This patch allows to rededine ar and ranlib tool using AR and
+RANLIB make flags.
+
+Fixes: PRI-188
+
+Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
+---
+ Makefile | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -27,6 +27,8 @@
+ CC=gcc
+ GREP=grep
+ AWK=awk
++AR=ar
++RANLIB=ranlib
+
+ OSARCH=$(shell uname -s)
+ PROC?=$(shell uname -m)
+@@ -193,8 +195,8 @@ MAKE_DEPS= -MD -MT $@ -MF .$(subst /,_,$
+ $(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
+
+ $(STATIC_LIBRARY): $(STATIC_OBJS)
+- ar rcs $(STATIC_LIBRARY) $(STATIC_OBJS)
+- ranlib $(STATIC_LIBRARY)
++ $(AR) rcs $(STATIC_LIBRARY) $(STATIC_OBJS)
++ $(RANLIB) $(STATIC_LIBRARY)
+
+ $(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS)
+ $(CC) $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
--- /dev/null
+From 68c69f516f95df1faa42e5647e9ce7cfdc41ac38 Mon Sep 17 00:00:00 2001
+From: Nanang Izzuddin <nanang@teluu.com>
+Date: Wed, 16 Jun 2021 12:15:29 +0700
+Subject: [PATCH 2/2] - Fix silly mistake: accepted active socket created
+ without group lock in SSL socket. - Replace assertion with normal validation
+ check of SSL socket instance in OpenSSL verification callback (verify_cb())
+ to avoid crash, e.g: if somehow race condition with SSL socket destroy
+ happens or OpenSSL application data index somehow gets corrupted.
+
+---
+ pjlib/src/pj/ssl_sock_imp_common.c | 3 +-
+ pjlib/src/pj/ssl_sock_ossl.c | 45 +++++++++++++++++++++++++-----
+ 2 files changed, 40 insertions(+), 8 deletions(-)
+
+--- a/pjlib/src/pj/ssl_sock_imp_common.c
++++ b/pjlib/src/pj/ssl_sock_imp_common.c
+@@ -949,6 +949,7 @@ static pj_bool_t asock_on_accept_complet
+
+ /* Create active socket */
+ pj_activesock_cfg_default(&asock_cfg);
++ asock_cfg.grp_lock = ssock->param.grp_lock;
+ asock_cfg.async_cnt = ssock->param.async_cnt;
+ asock_cfg.concurrency = ssock->param.concurrency;
+ asock_cfg.whole_data = PJ_TRUE;
+@@ -964,7 +965,7 @@ static pj_bool_t asock_on_accept_complet
+ goto on_return;
+
+ pj_grp_lock_add_ref(glock);
+- asock_cfg.grp_lock = ssock->param.grp_lock = glock;
++ ssock->param.grp_lock = glock;
+ pj_grp_lock_add_handler(ssock->param.grp_lock, ssock->pool, ssock,
+ ssl_on_destroy);
+ }
+--- a/pjlib/src/pj/ssl_sock_ossl.c
++++ b/pjlib/src/pj/ssl_sock_ossl.c
+@@ -327,7 +327,8 @@ static pj_status_t STATUS_FROM_SSL_ERR(c
+ ERROR_LOG("STATUS_FROM_SSL_ERR", err, ssock);
+ }
+
+- ssock->last_err = err;
++ if (ssock)
++ ssock->last_err = err;
+ return GET_STATUS_FROM_SSL_ERR(err);
+ }
+
+@@ -344,7 +345,8 @@ static pj_status_t STATUS_FROM_SSL_ERR2(
+ /* Dig for more from OpenSSL error queue */
+ SSLLogErrors(action, ret, err, len, ssock);
+
+- ssock->last_err = ssl_err;
++ if (ssock)
++ ssock->last_err = ssl_err;
+ return GET_STATUS_FROM_SSL_ERR(ssl_err);
+ }
+
+@@ -587,6 +589,13 @@ static pj_status_t init_openssl(void)
+
+ /* Create OpenSSL application data index for SSL socket */
+ sslsock_idx = SSL_get_ex_new_index(0, "SSL socket", NULL, NULL, NULL);
++ if (sslsock_idx == -1) {
++ status = STATUS_FROM_SSL_ERR2("Init", NULL, -1, ERR_get_error(), 0);
++ PJ_LOG(1,(THIS_FILE,
++ "Fatal error: failed to get application data index for "
++ "SSL socket"));
++ return status;
++ }
+
+ return status;
+ }
+@@ -614,21 +623,36 @@ static int password_cb(char *buf, int nu
+ }
+
+
+-/* SSL password callback. */
++/* SSL certificate verification result callback.
++ * Note that this callback seems to be always called from library worker
++ * thread, e.g: active socket on_read_complete callback, which should have
++ * already been equipped with race condition avoidance mechanism (should not
++ * be destroyed while callback is being invoked).
++ */
+ static int verify_cb(int preverify_ok, X509_STORE_CTX *x509_ctx)
+ {
+- pj_ssl_sock_t *ssock;
+- SSL *ossl_ssl;
++ pj_ssl_sock_t *ssock = NULL;
++ SSL *ossl_ssl = NULL;
+ int err;
+
+ /* Get SSL instance */
+ ossl_ssl = X509_STORE_CTX_get_ex_data(x509_ctx,
+ SSL_get_ex_data_X509_STORE_CTX_idx());
+- pj_assert(ossl_ssl);
++ if (!ossl_ssl) {
++ PJ_LOG(1,(THIS_FILE,
++ "SSL verification callback failed to get SSL instance"));
++ goto on_return;
++ }
+
+ /* Get SSL socket instance */
+ ssock = SSL_get_ex_data(ossl_ssl, sslsock_idx);
+- pj_assert(ssock);
++ if (!ssock) {
++ /* SSL socket may have been destroyed */
++ PJ_LOG(1,(THIS_FILE,
++ "SSL verification callback failed to get SSL socket "
++ "instance (sslsock_idx=%d).", sslsock_idx));
++ goto on_return;
++ }
+
+ /* Store verification status */
+ err = X509_STORE_CTX_get_error(x509_ctx);
+@@ -706,6 +730,7 @@ static int verify_cb(int preverify_ok, X
+ if (PJ_FALSE == ssock->param.verify_peer)
+ preverify_ok = 1;
+
++on_return:
+ return preverify_ok;
+ }
+
+@@ -1213,6 +1238,12 @@ static void ssl_destroy(pj_ssl_sock_t *s
+ static void ssl_reset_sock_state(pj_ssl_sock_t *ssock)
+ {
+ ossl_sock_t *ossock = (ossl_sock_t *)ssock;
++
++ /* Detach from SSL instance */
++ if (ossock->ossl_ssl) {
++ SSL_set_ex_data(ossock->ossl_ssl, sslsock_idx, NULL);
++ }
++
+ /**
+ * Avoid calling SSL_shutdown() if handshake wasn't completed.
+ * OpenSSL 1.0.2f complains if SSL_shutdown() is called during an
--- /dev/null
+From 15663e3f37091069b8c98a7fce680dc04bc8e865 Mon Sep 17 00:00:00 2001
+From: sauwming <ming@teluu.com>
+Date: Tue, 10 Aug 2021 11:53:25 +0800
+Subject: [PATCH] Merge pull request from GHSA-2qpg-f6wf-w984
+
+---
+ pjnath/src/pjnath/stun_msg.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/pjnath/src/pjnath/stun_msg.c
++++ b/pjnath/src/pjnath/stun_msg.c
+@@ -1763,6 +1763,9 @@ static pj_status_t decode_errcode_attr(p
+ /* Get pointer to the string in the message */
+ value.ptr = ((char*)buf + ATTR_HDR_LEN + 4);
+ value.slen = attr->hdr.length - 4;
++ /* Make sure the length is never negative */
++ if (value.slen < 0)
++ value.slen = 0;
+
+ /* Copy the string to the attribute */
+ pj_strdup(pool, &attr->reason, &value);
--- /dev/null
+From db3235953baa56d2fb0e276ca510fefca751643f Mon Sep 17 00:00:00 2001
+From: Nanang Izzuddin <nanang@teluu.com>
+Date: Mon, 21 Feb 2022 06:24:52 +0700
+Subject: [PATCH] Merge pull request from GHSA-ffff-m5fm-qm62
+
+* Update pjsip_ua_unregister_dlg():
+- update the hash key if the dialog being unregistered is used as hash key.
+- add an assertion check to make sure that the dlg_set to be removed is valid (can be found in the hash table).
+
+* Change hash key string comparison method.
+---
+ pjsip/src/pjsip/sip_ua_layer.c | 48 +++++++++++++++++++++++++++++-----
+ 1 file changed, 42 insertions(+), 6 deletions(-)
+
+--- a/pjsip/src/pjsip/sip_ua_layer.c
++++ b/pjsip/src/pjsip/sip_ua_layer.c
+@@ -65,6 +65,9 @@ struct dlg_set
+ /* This is the buffer to store this entry in the hash table. */
+ pj_hash_entry_buf ht_entry;
+
++ /* Entry key in the hash table */
++ pj_str_t ht_key;
++
+ /* List of dialog in this dialog set. */
+ struct dlg_set_head dlg_list;
+ };
+@@ -321,6 +324,7 @@ PJ_DEF(pj_status_t) pjsip_ua_register_dl
+ * Create the dialog set and add this dialog to it.
+ */
+ dlg_set = alloc_dlgset_node();
++ dlg_set->ht_key = dlg->local.info->tag;
+ pj_list_init(&dlg_set->dlg_list);
+ pj_list_push_back(&dlg_set->dlg_list, dlg);
+
+@@ -328,8 +332,8 @@ PJ_DEF(pj_status_t) pjsip_ua_register_dl
+
+ /* Register the dialog set in the hash table. */
+ pj_hash_set_np_lower(mod_ua.dlg_table,
+- dlg->local.info->tag.ptr,
+- (unsigned)dlg->local.info->tag.slen,
++ dlg_set->ht_key.ptr,
++ (unsigned)dlg_set->ht_key.slen,
+ dlg->local.tag_hval, dlg_set->ht_entry,
+ dlg_set);
+ }
+@@ -339,14 +343,15 @@ PJ_DEF(pj_status_t) pjsip_ua_register_dl
+ struct dlg_set *dlg_set;
+
+ dlg_set = alloc_dlgset_node();
++ dlg_set->ht_key = dlg->local.info->tag;
+ pj_list_init(&dlg_set->dlg_list);
+ pj_list_push_back(&dlg_set->dlg_list, dlg);
+
+ dlg->dlg_set = dlg_set;
+
+ pj_hash_set_np_lower(mod_ua.dlg_table,
+- dlg->local.info->tag.ptr,
+- (unsigned)dlg->local.info->tag.slen,
++ dlg_set->ht_key.ptr,
++ (unsigned)dlg_set->ht_key.slen,
+ dlg->local.tag_hval, dlg_set->ht_entry, dlg_set);
+ }
+
+@@ -391,12 +396,43 @@ PJ_DEF(pj_status_t) pjsip_ua_unregister_
+
+ /* If dialog list is empty, remove the dialog set from the hash table. */
+ if (pj_list_empty(&dlg_set->dlg_list)) {
+- pj_hash_set_lower(NULL, mod_ua.dlg_table, dlg->local.info->tag.ptr,
+- (unsigned)dlg->local.info->tag.slen,
++
++ /* Verify that the dialog set is valid */
++ pj_assert(pj_hash_get_lower(mod_ua.dlg_table, dlg_set->ht_key.ptr,
++ (unsigned)dlg_set->ht_key.slen,
++ &dlg->local.tag_hval) == dlg_set);
++
++ pj_hash_set_lower(NULL, mod_ua.dlg_table, dlg_set->ht_key.ptr,
++ (unsigned)dlg_set->ht_key.slen,
+ dlg->local.tag_hval, NULL);
+
+ /* Return dlg_set to free nodes. */
+ pj_list_push_back(&mod_ua.free_dlgset_nodes, dlg_set);
++ } else {
++ /* If the just unregistered dialog is being used as hash key,
++ * reset the dlg_set entry with a new key (i.e: from the first dialog
++ * in dlg_set).
++ */
++ if (dlg_set->ht_key.ptr == dlg->local.info->tag.ptr &&
++ dlg_set->ht_key.slen == dlg->local.info->tag.slen)
++ {
++ pjsip_dialog* key_dlg = dlg_set->dlg_list.next;
++
++ /* Verify that the old & new keys share the hash value */
++ pj_assert(key_dlg->local.tag_hval == dlg->local.tag_hval);
++
++ pj_hash_set_lower(NULL, mod_ua.dlg_table, dlg_set->ht_key.ptr,
++ (unsigned)dlg_set->ht_key.slen,
++ dlg->local.tag_hval, NULL);
++
++ dlg_set->ht_key = key_dlg->local.info->tag;
++
++ pj_hash_set_np_lower(mod_ua.dlg_table,
++ dlg_set->ht_key.ptr,
++ (unsigned)dlg_set->ht_key.slen,
++ key_dlg->local.tag_hval, dlg_set->ht_entry,
++ dlg_set);
++ }
+ }
+
+ /* Unlock user agent. */
--- /dev/null
+From 077b465c33f0aec05a49cd2ca456f9a1b112e896 Mon Sep 17 00:00:00 2001
+From: sauwming <ming@teluu.com>
+Date: Wed, 26 Jan 2022 13:28:57 +0800
+Subject: [PATCH] Merge pull request from GHSA-7fw8-54cv-r7pm
+
+---
+ pjlib-util/src/pjlib-util/scanner.c | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+--- a/pjlib-util/src/pjlib-util/scanner.c
++++ b/pjlib-util/src/pjlib-util/scanner.c
+@@ -444,16 +444,21 @@ PJ_DEF(void) pj_scan_get_n( pj_scanner *
+
+ PJ_DEF(int) pj_scan_get_char( pj_scanner *scanner )
+ {
+- int chr = *scanner->curptr;
++ register char *s = scanner->curptr;
++ int chr;
+
+- if (!chr) {
++ if (s >= scanner->end || !*s) {
+ pj_scan_syntax_err(scanner);
+ return 0;
+ }
+
+- ++scanner->curptr;
++ chr = *s;
+
+- if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws) {
++ ++s;
++ scanner->curptr = s;
++ if (PJ_SCAN_CHECK_EOF(s) && PJ_SCAN_IS_PROBABLY_SPACE(*s) &&
++ scanner->skip_ws)
++ {
+ pj_scan_skip_whitespace(scanner);
+ }
+ return chr;
PKG_NAME:=sofia-sip
-PKG_VERSION:=1.13.6
-PKG_RELEASE:=1
+PKG_VERSION:=1.13.7
+PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/freeswitch/$(PKG_NAME)/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=6f3cb48a35929abd3454087b32ad4c75fa5fe50fab8a9cc6f98559e6fd1bd64b
+PKG_HASH:=3bdcbe80a066c9cafa8d947d51512b86ed56bf2cdbb25dbe9b8eef6a8bab6a25
# sofia-sip adds a version to include path
# need to update this when the version changes
--- /dev/null
+From: https://issues.asterisk.org/jira/browse/ASTERISK-29905
+
+From d27d75ad8058f6ed35197737b949bac57202dd54 Mon Sep 17 00:00:00 2001
+From: "Sergey V. Lobanov" <sergey@lobanov.in>
+Date: Wed, 9 Feb 2022 01:29:46 +0300
+Subject: [PATCH] build: fix bininstall launchd issue on cross-platfrom build
+
+configure script detects /sbin/launchd, but the result of this
+check is not used in Makefile (bininstall). Makefile also detects
+/sbin/launchd file to decide if it is required to install
+safe_asterisk.
+
+configure script correctly detects cross compile build and sets
+PBX_LAUNCHD=0
+
+In case of building asterisk on MacOS host for Linux target using
+external toolchain (e.g. OpenWrt toolchain), bininstall does not
+install safe_asterisk (due to /sbin/launchd detection in Makefile),
+but it is required on target (Linux).
+
+This patch adds HAVE_SBIN_LAUNCHD=@PBX_LAUNCHD@ to makeopts.in to
+use the result of /sbin/launchd detection from configure script in
+Makefile.
+Also this patch uses HAVE_SBIN_LAUNCHD in Makefile (bininstall) to
+decide if it is required to install safe_asterisk.
+
+Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
+---
+ Makefile | 6 +++---
+ makeopts.in | 2 ++
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -589,9 +589,9 @@ bininstall: _all installdirs $(SUBDIRS_I
+ $(INSTALL) -m 755 contrib/scripts/astversion "$(DESTDIR)$(ASTSBINDIR)/"
+ $(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/"
+ $(INSTALL) -m 755 contrib/scripts/autosupport "$(DESTDIR)$(ASTSBINDIR)/"
+- if [ ! -f /sbin/launchd ]; then \
+- ./build_tools/install_subst contrib/scripts/safe_asterisk "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk"; \
+- fi
++ifneq ($(HAVE_SBIN_LAUNCHD),1)
++ ./build_tools/install_subst contrib/scripts/safe_asterisk "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk";
++endif
+
+ ifneq ($(DISABLE_XMLDOC),yes)
+ $(INSTALL) -m 644 doc/core-*.xml "$(DESTDIR)$(ASTDATADIR)/documentation"
+--- a/makeopts.in
++++ b/makeopts.in
+@@ -369,3 +369,5 @@ SNDFILE_LIB=@SNDFILE_LIB@
+
+ BEANSTALK_INCLUDE=@BEANSTALK_INCLUDE@
+ BEANSTALK_LIB=@BEANSTALK_LIB@
++
++HAVE_SBIN_LAUNCHD=@PBX_LAUNCHD@
$(eval $(call BuildPlugin,g711,G.711 audio codec,g711,))
$(eval $(call BuildPlugin,g722,G.722 audio codec,g722,+libspandsp))
$(eval $(call BuildPlugin,g726,G.726 audio codec,g726,+libspandsp))
-$(eval $(call BuildPlugin,gst,Gstreamer 1.0 playbin pipeline,gst,+glib2 +libgstreamer1))
-$(eval $(call BuildPlugin,gst_video,Video codecs using Gstreamer 1.0,gst_video,+glib2 +libgst1app +libgstreamer1))
+$(eval $(call BuildPlugin,gst,Gstreamer 1.0 playbin pipeline,gst,@AUDIO_SUPPORT +glib2 +libgstreamer1))
+$(eval $(call BuildPlugin,gst_video,Video codecs using Gstreamer 1.0,gst_video,@AUDIO_SUPPORT +glib2 +libgst1app +libgstreamer1))
$(eval $(call BuildPlugin,httpd,HTTP webserver UI-module,httpd,))
$(eval $(call BuildPlugin,httpreq,HTTP request module,httpreq,))
$(eval $(call BuildPlugin,l16,16-bit linear codec,l16,))
PKG_NAME:=coturn
PKG_VERSION:=4.5.2
-PKG_RELEASE:=2
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/coturn/coturn/tar.gz/$(PKG_VERSION)?
--turndbdir=/etc/turnserver
CONFIGURE_VARS+= \
+ ARCHIVERCMD="$(TARGET_AR) -r" \
+ LIBEV_OK=1 \
TURN_NO_PROMETHEUS=1 \
TURN_NO_SCTP=1 \
TURN_NO_SYSTEMD=1 \
PKG_NAME:=freeswitch
PKG_VERSION:=1.10.7
-PKG_RELEASE:=2
+PKG_RELEASE:=$(AUTORELEASE)
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
PKG_SOURCE:=freeswitch-$(PKG_VERSION).-release.tar.xz
$(eval $(call Package/freeswitch/Module,alsa,ALSA endpoint,ALSA endpoint module.,+alsa-lib))
$(eval $(call Package/freeswitch/Module,amr,AMR passthrough,Passthrough AMR codec support.,))
$(eval $(call Package/freeswitch/Module,amrwb,AMR wideband passthrough,Passthrough AMR wideband codec support.,))
-$(eval $(call Package/freeswitch/Module,av,AV,Video codec and format support via FFmpeg.,+libffmpeg-full @x86_64))
+$(eval $(call Package/freeswitch/Module,av,AV,Video codec and format support via FFmpeg.,+libffmpeg-full @BROKEN @x86_64))
$(eval $(call Package/freeswitch/Module,avmd,Voicemail detection,This module attempts to determine when a voicemail system has answered\nthe call.,))
$(eval $(call Package/freeswitch/Module,b64,Base64,Transfers data Base64 encoded.,))
$(eval $(call Package/freeswitch/Module,basic,BASIC,BASIC module for FreeSWITCH.,))
include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/kernel.mk
include $(TOPDIR)/feeds/packages/lang/python/python3-version.mk
# Build reproducibly
endif
MAKE_FLAGS += \
+ OS=linux \
+ OSREL=$(LINUX_UNAME_VERSION) \
$(if $(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_MIPS2)),ARCH="mips2",ARCH="$(ARCH)") \
CC_EXTRA_OPTS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LD="$(TARGET_CC)" \
+++ /dev/null
-#
-# Copyright (C) 2010-2017 OpenWrt.org
-# Copyright (C) 2010 Alfred E. Heggestad
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=restund
-PKG_VERSION:=0.4.12
-PKG_RELEASE:=9
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.creytiv.com/pub
-PKG_HASH:=3170441dc882352ab0275556b6fc889b38b14203d936071b5fa12f39a5c86d47
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=docs/COPYING
-PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
-
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-
-restund-mods:=mysql
-
-PKG_CONFIG_DEPENDS:=$(patsubst %,CONFIG_PACKAGE_restund-mod-%,$(restund-mods))
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/restund/Default
- SECTION:=net
- CATEGORY:=Network
- SUBMENU:=Telephony
- URL:=http://www.creytiv.com
-endef
-
-define Package/restund
-$(call Package/restund/Default)
- TITLE:=Modular STUN/TURN server
- DEPENDS:=+libre
- USERID:=$(PKG_NAME)=373:$(PKG_NAME)=373
-endef
-
-restund-mod-mysql:=USE_MYSQL
-
-RESTUND_MOD_OPTIONS:= \
- $(foreach m,$(restund-mods),$(restund-mod-$(m))=$(if $(CONFIG_PACKAGE_restund-mod-$(m)),1))
-
-MAKE_FLAGS+= \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- EXTRA_LFLAGS="$(TARGET_LDFLAGS)" \
- LD="$(TARGET_CC)" \
- LIBRE_MK="$(STAGING_DIR)/usr/share/re/re.mk" \
- LIBRE_INC="$(STAGING_DIR)/usr/include/re" \
- LIBRE_SO="$(STAGING_DIR)/usr/lib" \
- OS=linux \
- RELEASE=1 \
- SYSROOT="$(shell $(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s|/include/pthread.h||p')" \
- SYSROOT_ALT="$(STAGING_DIR)/usr" \
- $(RESTUND_MOD_OPTIONS)
-
-define Package/restund/install
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/restund $(1)/usr/sbin
- $(INSTALL_DIR) $(1)/usr/lib/restund/modules
- $(INSTALL_DATA) \
- $(PKG_INSTALL_DIR)/usr/lib/restund/modules/auth.so \
- $(PKG_INSTALL_DIR)/usr/lib/restund/modules/binding.so \
- $(PKG_INSTALL_DIR)/usr/lib/restund/modules/filedb.so \
- $(PKG_INSTALL_DIR)/usr/lib/restund/modules/restauth.so \
- $(PKG_INSTALL_DIR)/usr/lib/restund/modules/stat.so \
- $(PKG_INSTALL_DIR)/usr/lib/restund/modules/status.so \
- $(PKG_INSTALL_DIR)/usr/lib/restund/modules/syslog.so \
- $(PKG_INSTALL_DIR)/usr/lib/restund/modules/turn.so \
- $(1)/usr/lib/restund/modules
- $(INSTALL_DIR) $(1)/etc
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/restund.conf $(1)/etc
- $(SED) \
- 's|^\(module_path\)\([ \t]\+\).*$$$$|\1\2/usr/lib/restund/modules|g' \
- $(1)/etc/restund.conf
- $(INSTALL_DIR) $(1)/etc/default
- $(INSTALL_CONF) ./files/restund.default $(1)/etc/default/restund
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/restund.init $(1)/etc/init.d/restund
-endef
-
-define Package/restund/conffiles
-/etc/default/restund
-/etc/init.d/restund
-/etc/restund.conf
-endef
-
-define Package/restund/postinst
-#!/bin/sh
-if [ -z "$${IPKG_INSTROOT}" ]; then
- echo
- echo "o-------------------------------------------------------------------o"
- echo "| restund note |"
- echo "o-------------------------------------------------------------------o"
- echo "| restund has been dropped upstream and will be deleted from the |"
- echo "| OpenWrt telephony feed in February 2022. |"
- echo "| |"
- echo "| You may want to migrate to the coturn package, which provides |"
- echo "| turnserver. |"
- echo "o-------------------------------------------------------------=^_^=-o"
- echo
-fi
-exit 0
-endef
-
-#
-# 1. Name
-# 2. Title
-# 3. Files
-# 4. Depends
-#
-define BuildPlugin
-
- define Package/restund-mod-$(1)
- $$(call Package/restund/Default)
- TITLE:=restund $(2) module
- DEPENDS:=restund $(patsubst +%,+PACKAGE_$(PKG_NAME)-mod-$(1):%,$(4))
- endef
-
- define Package/restund-mod-$(1)/install
- [ -z "$(3)" ] || $(INSTALL_DIR) $$(1)/usr/lib/restund/modules
- for f in $(3); do \
- $(INSTALL_DATA) \
- $(PKG_INSTALL_DIR)/usr/lib/restund/modules/$$$$$$$${f}.so \
- $$(1)/usr/lib/restund/modules; \
- done
- endef
-
- $$(eval $$(call BuildPackage,restund-mod-$(1)))
-endef
-
-$(eval $(call BuildPackage,restund))
-
-$(eval $(call BuildPlugin,mysql,MySQL database backend,mysql_ser,+libmysqlclient))
+++ /dev/null
-### restund init configuration ###
-
-# Uncomment once you verified your configuration, otherwise the init script will
-# not start restund.
-#ENABLE_RESTUND="yes"
-
-# The following is added to the command line when starting restund:
-OPTIONS=""
+++ /dev/null
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2017 OpenWrt.org
-
-START=60
-
-USE_PROCD=1
-
-#PROCD_DEBUG=1
-
-DAEMON=restund
-DEFAULT=/etc/default/$DAEMON
-LOGGER="/usr/bin/logger -p user.err -s -t $DAEMON"
-OPTIONS=
-PROG=/usr/sbin/$DAEMON
-
-[ -f $DEFAULT ] && . $DEFAULT
-
-start_service() {
- local dir=
-
- if [ "$ENABLE_RESTUND" != yes ]; then
- $LOGGER User configuration incomplete - not starting $DAEMON
- $LOGGER Check ENABLE_RESTUND in $DEFAULT
- exit 1
- fi
-
- procd_open_instance
- procd_set_param command $PROG
- procd_append_param command \
- -n \
- $OPTIONS
- procd_set_param pidfile /var/run/${DAEMON}.pid
- # forward stderr to logd
- procd_set_param stderr 1
- # forward stdout to logd
- procd_set_param stdout 1
- procd_set_param user $DAEMON
- procd_close_instance
-}
+++ /dev/null
---- a/modules/status/status.c
-+++ b/modules/status/status.c
-@@ -30,9 +30,6 @@ static void server_info(struct mbuf *mb)
- mbuf_write_str(mb, "<table>\n");
- mbuf_write_str(mb,
- " <tr><td>Version:</td><td>" VERSION "</td></tr>\n");
-- mbuf_write_str(mb,
-- " <tr><td>Built:</td><td>" __DATE__ " " __TIME__
-- "</td></tr>\n");
- mbuf_printf(mb, " <tr><td>Uptime:</td><td>%H</td></tr>\n",
- fmt_human_time, &uptime);
- mbuf_write_str(mb, "</table>\n");
+++ /dev/null
-From ffa2d56cac3d37715fe1381df81802774240da92 Mon Sep 17 00:00:00 2001
-From: Dusan Stevanovic <dule@wire.com>
-Date: Thu, 11 Mar 2021 10:58:32 +0100
-Subject: [PATCH] turn: block forwarding to loopback/any
-
----
- modules/turn/turn.c | 18 ++++++++++++++----
- 1 file changed, 14 insertions(+), 4 deletions(-)
-
---- a/modules/turn/turn.c
-+++ b/modules/turn/turn.c
-@@ -153,6 +153,7 @@ static bool indication_handler(struct re
- struct stun_attr *data, *peer;
- struct allocation *al;
- struct perm *perm;
-+ const struct sa *psa;
- int err;
- (void)sock;
- (void)ctx;
-@@ -173,13 +174,17 @@ static bool indication_handler(struct re
- if (!peer || !data)
- return true;
-
-- perm = perm_find(al->perms, &peer->v.xor_peer_addr);
-+ psa = &peer->v.xor_peer_addr;
-+ perm = perm_find(al->perms, psa);
- if (!perm) {
- ++al->dropc_tx;
- return true;
- }
-
-- err = udp_send(al->rel_us, &peer->v.xor_peer_addr, &data->v.data);
-+ if (sa_is_loopback(psa) || sa_is_any(psa))
-+ err = EPERM;
-+ else
-+ err = udp_send(al->rel_us, psa, &data->v.data);
- if (err)
- turnd.errc_tx++;
- else {
-@@ -200,6 +205,7 @@ static bool raw_handler(int proto, const
- uint16_t numb, len;
- struct perm *perm;
- struct chan *chan;
-+ const struct sa *psa;
- int err;
-
- al = allocation_find(proto, src, dst);
-@@ -219,7 +225,8 @@ static bool raw_handler(int proto, const
- if (!chan)
- return false;
-
-- perm = perm_find(al->perms, chan_peer(chan));
-+ psa = chan_peer(chan);
-+ perm = perm_find(al->perms, psa);
- if (!perm) {
- ++al->dropc_tx;
- return false;
-@@ -227,7 +234,10 @@ static bool raw_handler(int proto, const
-
- mb->end = mb->pos + len;
-
-- err = udp_send(al->rel_us, chan_peer(chan), mb);
-+ if (sa_is_loopback(psa) || sa_is_any(psa))
-+ err = EPERM;
-+ else
-+ err = udp_send(al->rel_us, psa, mb);
- if (err)
- turnd.errc_tx++;
- else {
+++ /dev/null
-From e2f4094e23c73d4563a55f0de72244f34bb5b702 Mon Sep 17 00:00:00 2001
-From: Dusan Stevanovic <dule@wire.com>
-Date: Thu, 11 Mar 2021 11:53:50 +0100
-Subject: [PATCH] turn: also don't forward linklocal addresses
-
----
- modules/turn/turn.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/modules/turn/turn.c
-+++ b/modules/turn/turn.c
-@@ -181,7 +181,7 @@ static bool indication_handler(struct re
- return true;
- }
-
-- if (sa_is_loopback(psa) || sa_is_any(psa))
-+ if (sa_is_loopback(psa) || sa_is_any(psa) || sa_is_linklocal(psa))
- err = EPERM;
- else
- err = udp_send(al->rel_us, psa, &data->v.data);
-@@ -234,7 +234,7 @@ static bool raw_handler(int proto, const
-
- mb->end = mb->pos + len;
-
-- if (sa_is_loopback(psa) || sa_is_any(psa))
-+ if (sa_is_loopback(psa) || sa_is_any(psa) || sa_is_linklocal(psa))
- err = EPERM;
- else
- err = udp_send(al->rel_us, psa, mb);
+++ /dev/null
-From 955064fc220b5739010a2e207a8561ea44f974d3 Mon Sep 17 00:00:00 2001
-From: Dusan Stevanovic <dule@wire.com>
-Date: Thu, 11 Mar 2021 13:15:27 +0100
-Subject: [PATCH] turn: block whole loopback range, also block broadcast
-
----
- modules/turn/turn.c | 20 ++++++++++++++++++--
- 1 file changed, 18 insertions(+), 2 deletions(-)
-
---- a/modules/turn/turn.c
-+++ b/modules/turn/turn.c
-@@ -144,6 +144,22 @@ static bool request_handler(struct restu
- return true;
- }
-
-+static inline bool is_loopback(const struct sa *sa)
-+{
-+ return (ntohl(sa->u.in.sin_addr.s_addr) & 0xffffff00) == 0x7f000000;
-+}
-+
-+static inline bool is_broadcast(const struct sa *sa)
-+{
-+ return ntohl(sa->u.in.sin_addr.s_addr) == 0xffffffff;
-+}
-+
-+static inline bool is_blocked(const struct sa *sa)
-+{
-+ return is_loopback(sa) || is_broadcast(sa)
-+ || sa_is_any(sa) || sa_is_linklocal(sa);
-+
-+}
-
- static bool indication_handler(struct restund_msgctx *ctx, int proto,
- void *sock, const struct sa *src,
-@@ -181,7 +197,7 @@ static bool indication_handler(struct re
- return true;
- }
-
-- if (sa_is_loopback(psa) || sa_is_any(psa) || sa_is_linklocal(psa))
-+ if (is_blocked(psa))
- err = EPERM;
- else
- err = udp_send(al->rel_us, psa, &data->v.data);
-@@ -234,7 +250,7 @@ static bool raw_handler(int proto, const
-
- mb->end = mb->pos + len;
-
-- if (sa_is_loopback(psa) || sa_is_any(psa) || sa_is_linklocal(psa))
-+ if (is_blocked(psa))
- err = EPERM;
- else
- err = udp_send(al->rel_us, psa, mb);
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=rtpengine
-PKG_VERSION:=9.5.2.1
-PKG_RELEASE:=1
+PKG_VERSION:=9.5.3.2
+PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-mr$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/sipwise/rtpengine/tar.gz/mr$(PKG_VERSION)?
-PKG_HASH:=c7f08783e6d085b0fb1e2499a87a1e82f70aeb57f00f74ba56c5b2a2452c8fba
+PKG_HASH:=03d8da1b5efcaa17ef88f306046f49e30ca87b3998c26a13bd96df922f8e729f
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-mr$(PKG_VERSION)
# errors.
PKG_BUILD_PARALLEL:=0
-PKG_BUILD_DEPENDS:=gperf/host
+PKG_BUILD_DEPENDS:=gperf/host perl/host
# With below variable set, $(PKG_SYMVERS_DIR)/rtpengine.symvers gets generated
# from kernel-module/Module.symvers.
cd "$(PKG_BUILD_DIR)" && \
$(FIND) . -maxdepth 2 -name "*Makefile" | \
xargs -I{} $(SED) \
- '/shell which dpkg-/s/dpkg/OpenWrt-has-no-dpkg/' {}
+ '/shell which dpkg-/s/dpkg/OpenWrt-has-no-dpkg/' {} && \
+ $(SED) 's|#!/usr/bin/perl|#!$(STAGING_DIR_HOSTPKG)/usr/bin/perl|' \
+ utils/const_str_hash
endif
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=siproxd
-PKG_VERSION:=0.8.3
-PKG_RELEASE:=4
+PKG_RELEASE:=$(AUTORELEASE)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/siproxd
-PKG_HASH:=9a6d7a6bb6fff162775b1e1fb7018de9c69642cbf8626185dc6ffceeeba07736
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/hb9xar/siproxd.git
+PKG_SOURCE_DATE:=2022-02-18
+PKG_SOURCE_VERSION:=4750bea4ffedb4543a404dafc979c2b16b53e523
+PKG_MIRROR_HASH:=e6c4266b9eba43792908cf7c4ee73c32eee7b3a227ee671a5381cc335295fc05
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
endef
CONFIGURE_ARGS+= \
+ --enable-reproducible-build \
--with-libosip-prefix="$(STAGING_DIR)/usr" \
--without-included-ltdl \
--disable-doc
PKG_NAME:=yate
PKG_VERSION:=6.4.0-1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://yate.null.ro/tarballs/yate6/
PKG_BUILD_PARALLEL:=0
PKG_INSTALL:=1
+PKG_BUILD_DEPENDS:=HOST_OS_MACOS:fakeuname/host
+
# Yate currently does not compile with FORTIFY_SOURCE enabled
PKG_FORTIFY_SOURCE:=0
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
+ifeq ($(CONFIG_HOST_OS_MACOS),y)
+ include $(TOPDIR)/feeds/packages/utils/fakeuname/fakeuname.mk
+endif
TAR_OPTIONS+= --strip-components 1
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
# Otherwise yate ignores CPPFLAGS
TARGET_CFLAGS += $(TARGET_CPPFLAGS)
+CONFIGURE_VARS+= \
+ $(if $(CONFIG_HOST_OS_MACOS),PATH=$(FAKEUNAME_PATH):$(TARGET_PATH_PKG))
+
CONFIGURE_ARGS+= \
--disable-sctp \
--disable-tdmcard \