kamailio-5.x: update to 5.1.6
Minor version bump. Two CVE patches can be removed as they're already included in the source. One patch was refreshed. Also: - https://sources.openwrt.org is added as primary source URL to lessen the load on kamailio upstream - Build/Configure is defined as empty (because there is no configure script in the source tree - patch is added to fix dp_replace(); the function was first added in the 5.1 release and didn't work; patch was accepted upstream Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
parent
65565186ec
commit
e8034c181f
5 changed files with 40 additions and 81 deletions
|
@ -9,12 +9,14 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=kamailio5
|
||||
PKG_VERSION:=5.1.3
|
||||
PKG_RELEASE:=4
|
||||
PKG_VERSION:=5.1.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://www.kamailio.org/pub/kamailio/$(PKG_VERSION)/src
|
||||
PKG_SOURCE_URL := \
|
||||
https://sources.openwrt.org \
|
||||
https://www.kamailio.org/pub/kamailio/$(PKG_VERSION)/src
|
||||
PKG_SOURCE:=kamailio-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz
|
||||
PKG_HASH:=b2266e15ec8ffa62be66b44989155f26a31d137f06f81fb3841aad8315315a14
|
||||
PKG_HASH:=99880df20dd836e4d9ec03fe863f7a5fc77bb29e3d56f59ea92b8b986deb5186
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
PKG_LICENSE:=GPL-2.0+
|
||||
|
@ -424,6 +426,9 @@ PKG_MAKE_ARGS:= \
|
|||
DESTDIR=$(PKG_INSTALL_DIR) \
|
||||
quiet=verbose
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) cfg
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) quiet=verbose all
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
commit 281a6c6b6eaaf30058b603325e8ded20b99e1456
|
||||
Author: Henning Westerholt <hw@kamailio.org>
|
||||
Date: Mon May 7 09:36:53 2018 +0200
|
||||
|
||||
core: improve to header check guards, str consists of length and pointer
|
||||
|
||||
diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c
|
||||
index 22122768a..4dd648e87 100644
|
||||
--- a/src/core/msg_translator.c
|
||||
+++ b/src/core/msg_translator.c
|
||||
@@ -2369,7 +2369,7 @@ char * build_res_buf_from_sip_req( unsigned int code, str *text ,str *new_tag,
|
||||
case HDR_TO_T:
|
||||
if (new_tag && new_tag->len) {
|
||||
to_tag=get_to(msg)->tag_value;
|
||||
- if ( to_tag.len || to_tag.s )
|
||||
+ if ( to_tag.len && to_tag.s )
|
||||
len+=new_tag->len-to_tag.len;
|
||||
else
|
||||
len+=new_tag->len+TOTAG_TOKEN_LEN/*";tag="*/;
|
||||
@@ -2497,7 +2497,7 @@ char * build_res_buf_from_sip_req( unsigned int code, str *text ,str *new_tag,
|
||||
break;
|
||||
case HDR_TO_T:
|
||||
if (new_tag && new_tag->len){
|
||||
- if (to_tag.s ) { /* replacement */
|
||||
+ if (to_tag.len && to_tag.s) { /* replacement */
|
||||
/* before to-tag */
|
||||
append_str( p, hdr->name.s, to_tag.s-hdr->name.s);
|
||||
/* to tag replacement */
|
|
@ -1,46 +0,0 @@
|
|||
commit d67b2f9874ca23bd69f18df71b8f53b1b6151f6d
|
||||
Author: Henning Westerholt <hw@kamailio.org>
|
||||
Date: Sun Jun 3 20:59:32 2018 +0200
|
||||
|
||||
core: improve header safe guards for Via handling
|
||||
|
||||
(cherry picked from commit ad68e402ece8089f133c10de6ce319f9e28c0692)
|
||||
|
||||
diff --git a/src/core/crc.c b/src/core/crc.c
|
||||
index 462846324..23b2876ec 100644
|
||||
--- a/src/core/crc.c
|
||||
+++ b/src/core/crc.c
|
||||
@@ -231,6 +231,8 @@ void crcitt_string_array( char *dst, str src[], int size )
|
||||
ccitt = 0xFFFF;
|
||||
str_len=CRC16_LEN;
|
||||
for (i=0; i<size; i++ ) {
|
||||
+ /* invalid str with positive length and null char pointer */
|
||||
+ if( unlikely(src[i].s==NULL)) break;
|
||||
c=src[i].s;
|
||||
len=src[i].len;
|
||||
while(len) {
|
||||
diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c
|
||||
index 201e3a5e1..58978f958 100644
|
||||
--- a/src/core/msg_translator.c
|
||||
+++ b/src/core/msg_translator.c
|
||||
@@ -168,12 +168,17 @@ static int check_via_address(struct ip_addr* ip, str *name,
|
||||
(name->s[name->len-1]==']')&&
|
||||
(strncasecmp(name->s+1, s, len)==0))
|
||||
)
|
||||
- )
|
||||
+ ) {
|
||||
return 0;
|
||||
- else
|
||||
-
|
||||
+ }
|
||||
+ else {
|
||||
+ if (unlikely(name->s==NULL)) {
|
||||
+ LM_CRIT("invalid Via host name\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
if (strncmp(name->s, s, name->len)==0)
|
||||
return 0;
|
||||
+ }
|
||||
}else{
|
||||
LM_CRIT("could not convert ip address\n");
|
||||
return -1;
|
|
@ -17,11 +17,9 @@ Date: Sun Oct 7 18:54:39 2018 +0200
|
|||
|
||||
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
|
||||
diff --git a/utils/kamctl/kamctl.base b/utils/kamctl/kamctl.base
|
||||
index adeceb77f..a776e10d8 100644
|
||||
--- a/utils/kamctl/kamctl.base
|
||||
+++ b/utils/kamctl/kamctl.base
|
||||
@@ -715,7 +715,7 @@ filter_json()
|
||||
@@ -699,7 +699,7 @@ filter_json()
|
||||
$AWK 'function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s }
|
||||
BEGIN { line=0; IGNORECASE=1; }
|
||||
{ line++; }
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
commit cbff35909edccffe778d04f3871d880195d82b7a
|
||||
Author: Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
Date: Fri Nov 2 10:10:38 2018 +0100
|
||||
|
||||
dialplan: fix dp_replace() in cmd_export_t struct
|
||||
|
||||
In the struct 'int param_no' is set to '2'. But dp_replace() has actually three
|
||||
parameters (dpid, inval, outvar), so kamailio's cfg parser fails when
|
||||
dp_replace() is called:
|
||||
|
||||
yyparse(): cfg. parser: failed to find command dp_replace (params 3)
|
||||
yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 366, column 45: unknown command, missing loadmodule?
|
||||
|
||||
This commit fixes 'int param_no' to address this.
|
||||
|
||||
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
|
||||
diff --git a/src/modules/dialplan/dialplan.c b/src/modules/dialplan/dialplan.c
|
||||
index 39ba1ceef..a96b246b7 100644
|
||||
--- a/src/modules/dialplan/dialplan.c
|
||||
+++ b/src/modules/dialplan/dialplan.c
|
||||
@@ -115,7 +115,7 @@ static cmd_export_t cmds[]={
|
||||
ANY_ROUTE},
|
||||
{"dp_match",(cmd_function)w_dp_match, 2, fixup_igp_spve,
|
||||
fixup_free_igp_spve, ANY_ROUTE},
|
||||
- {"dp_replace",(cmd_function)w_dp_replace, 2, dp_replace_fixup,
|
||||
+ {"dp_replace",(cmd_function)w_dp_replace, 3, dp_replace_fixup,
|
||||
dp_replace_fixup_free, ANY_ROUTE},
|
||||
{0,0,0,0,0,0}
|
||||
};
|
Loading…
Reference in a new issue