diff --git a/telephony/siproxd/Makefile b/telephony/siproxd/Makefile index 57d1a4c0168..25fa081b77b 100644 --- a/telephony/siproxd/Makefile +++ b/telephony/siproxd/Makefile @@ -1,8 +1,7 @@ COMMENT= proxy/masquerading daemon for the SIP protocol -DISTNAME= siproxd-0.8.3 +DISTNAME= siproxd-0.8.4 CATEGORIES= telephony net -REVISION= 1 HOMEPAGE= https://siproxd.sourceforge.net/ @@ -27,6 +26,8 @@ LIB_DEPENDS= databases/sqlite3 \ devel/libtool,-ltdl \ telephony/libosip2 +DEBUG_PACKAGES= ${BUILD_PACKAGES} + DOCDIR= ${PREFIX}/share/doc/siproxd EXDIR= ${PREFIX}/share/examples/siproxd SUBST_VARS= PREFIX diff --git a/telephony/siproxd/distinfo b/telephony/siproxd/distinfo index 2977563ec1c..41c1e7f4e02 100644 --- a/telephony/siproxd/distinfo +++ b/telephony/siproxd/distinfo @@ -1,2 +1,2 @@ -SHA256 (siproxd-0.8.3.tar.gz) = mm16a7b/8WJ3Wx4ftwGN6caWQsv4YmGF3G/87uugdzY= -SIZE (siproxd-0.8.3.tar.gz) = 602331 +SHA256 (siproxd-0.8.4.tar.gz) = rVub8kcTrtApBlB6UD7QyF4mkhyb6mPHKtrEpe455BY= +SIZE (siproxd-0.8.4.tar.gz) = 630814 diff --git a/telephony/siproxd/patches/patch-doc_siproxd_conf_example b/telephony/siproxd/patches/patch-doc_siproxd_conf_example index 5c7ddc4bb08..e34af24dba5 100644 --- a/telephony/siproxd/patches/patch-doc_siproxd_conf_example +++ b/telephony/siproxd/patches/patch-doc_siproxd_conf_example @@ -51,7 +51,7 @@ Index: doc/siproxd.conf.example ###################################################################### # global switch to control the RTP proxy behaviour -@@ -326,25 +329,25 @@ outbound_domain_port = 5060 +@@ -326,26 +329,26 @@ outbound_domain_port = 5060 # The plugins are loaded in the order they appear here. Also # the processing order is given by the load order. # @@ -70,6 +70,7 @@ Index: doc/siproxd.conf.example -#load_plugin=plugin_stun.la -#load_plugin=plugin_prefix.la -#load_plugin=plugin_regex.la +-#load_plugin=plugin_regex_body.la -#load_plugin=plugin_stripheader.la -#load_plugin=plugin_codecfilter.la -#load_plugin=plugin_siptrunk.la @@ -86,6 +87,7 @@ Index: doc/siproxd.conf.example +#load_plugin=plugin_stun.so +#load_plugin=plugin_prefix.so +#load_plugin=plugin_regex.so ++#load_plugin=plugin_regex_body.so +#load_plugin=plugin_stripheader.so +#load_plugin=plugin_codecfilter.so +#load_plugin=plugin_siptrunk.so diff --git a/telephony/siproxd/patches/patch-src_Makefile_in b/telephony/siproxd/patches/patch-src_Makefile_in index e9f87a61c76..fc8743cedc0 100644 --- a/telephony/siproxd/patches/patch-src_Makefile_in +++ b/telephony/siproxd/patches/patch-src_Makefile_in @@ -1,7 +1,7 @@ Index: src/Makefile.in --- src/Makefile.in.orig +++ src/Makefile.in -@@ -1080,7 +1080,7 @@ uninstall-am: uninstall-pkglibLTLIBRARIES uninstall-sb +@@ -1225,7 +1225,7 @@ uninstall-am: uninstall-pkglibLTLIBRARIES uninstall-sb # count BUILDs - each time increment by one and define the # C macro BUILDNO. bind it to a file everybody includes (log.h) # diff --git a/telephony/siproxd/patches/patch-src_auth_c b/telephony/siproxd/patches/patch-src_auth_c new file mode 100644 index 00000000000..7438f0f73c9 --- /dev/null +++ b/telephony/siproxd/patches/patch-src_auth_c @@ -0,0 +1,45 @@ +Index: src/auth.c +--- src/auth.c.orig ++++ src/auth.c +@@ -26,7 +26,6 @@ + #include + + #include +-#include + + #include + +@@ -130,25 +129,15 @@ static char *auth_generate_nonce() { + struct timeval tv; + int i; + +- /* Use POSIX getrandom() - available since POSIX.1-2013 */ +- if (getrandom(random_bytes, sizeof(random_bytes), 0) == sizeof(random_bytes)) { +- nonce[0] = '"'; +- /* Convert to hex string */ +- for (i = 0; i < 16; i++) { +- nonce[1 + i*2] = hexchars[(random_bytes[i] >> 4) & 0x0f]; +- nonce[1 + i*2 + 1] = hexchars[random_bytes[i] & 0x0f]; +- } +- nonce[33] = '"'; +- nonce[34] = '\0'; +- +- } else { +- // getrandom() failed or did not return the expected number +- // of bytes - fallback to something else (not secure) +- WARN("getrandom() failed, falling back to less secure mechanism"); +- gettimeofday (&tv, NULL); +- sprintf(nonce, "\"%8.8lx%8.8lx%8.8x%8.8x\"", +- (long)tv.tv_sec, (long)tv.tv_usec, rand(), rand() ); ++ arc4random_buf(random_bytes, sizeof(random_bytes)); ++ nonce[0] = '"'; ++ /* Convert to hex string */ ++ for (i = 0; i < 16; i++) { ++ nonce[1 + i*2] = hexchars[(random_bytes[i] >> 4) & 0x0f]; ++ nonce[1 + i*2 + 1] = hexchars[random_bytes[i] & 0x0f]; + } ++ nonce[33] = '"'; ++ nonce[34] = '\0'; + + DEBUGC(DBCLASS_AUTH, "created nonce=%s", nonce); + return nonce; diff --git a/telephony/siproxd/patches/patch-src_rtpproxy_c b/telephony/siproxd/patches/patch-src_rtpproxy_c deleted file mode 100644 index 1e7ecb2c17b..00000000000 --- a/telephony/siproxd/patches/patch-src_rtpproxy_c +++ /dev/null @@ -1,11 +0,0 @@ -Index: src/rtpproxy.c ---- src/rtpproxy.c.orig -+++ src/rtpproxy.c -@@ -22,6 +22,7 @@ - - #include - #include -+#include - #include - - #include diff --git a/telephony/siproxd/patches/patch-src_siproxd_c b/telephony/siproxd/patches/patch-src_siproxd_c index 32654b77479..bf256102eab 100644 --- a/telephony/siproxd/patches/patch-src_siproxd_c +++ b/telephony/siproxd/patches/patch-src_siproxd_c @@ -2,7 +2,7 @@ This prevents siproxd from creating a redundant PID file outside the chroot jail Index: src/siproxd.c --- src/siproxd.c.orig +++ src/siproxd.c -@@ -314,13 +314,6 @@ int main (int argc, char *argv[]) +@@ -313,13 +313,6 @@ int main (int argc, char *argv[]) /* prepare for creating PID file */ if (pidfilename == NULL) pidfilename = configuration.pid_file; diff --git a/telephony/siproxd/pkg/PLIST b/telephony/siproxd/pkg/PLIST index c1f446588c8..c47993dd155 100644 --- a/telephony/siproxd/pkg/PLIST +++ b/telephony/siproxd/pkg/PLIST @@ -12,6 +12,7 @@ lib/siproxd/ @so lib/siproxd/plugin_logcall.so @so lib/siproxd/plugin_prefix.so @so lib/siproxd/plugin_regex.so +@so lib/siproxd/plugin_regex_body.so @so lib/siproxd/plugin_shortdial.so @so lib/siproxd/plugin_siptrunk.so @so lib/siproxd/plugin_stats.so