Module: kamailio
Branch: 5.0
Commit: cea3af6dd4c2275df1f0e33a7adf0a29ac711b6c
URL: https://github.com/kamailio/kamailio/commit/cea3af6dd4c2275df1f0e33a7adf0a2…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-11-24T10:01:16+01:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/nathelper/README
---
Diff: https://github.com/kamailio/kamailio/commit/cea3af6dd4c2275df1f0e33a7adf0a2…
Patch: https://github.com/kamailio/kamailio/commit/cea3af6dd4c2275df1f0e33a7adf0a2…
---
diff --git a/src/modules/nathelper/README b/src/modules/nathelper/README
index f5e831ae5c..3918f479ba 100644
--- a/src/modules/nathelper/README
+++ b/src/modules/nathelper/README
@@ -612,7 +612,8 @@ if(is_rfc1918("$rd")) {
Adds an “;alias=ip~port~transport” parameter to the contact URI
containing either received ip, port, and transport protocol or those
given as parameters. If called without parameters, “;alias” parameter
- is only added if received ip and port differ from those in contact URI.
+ is only added if received ip, port, or transport protocol differs from
+ that in contact URI.
This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
BRANCH_ROUTE, and LOCAL_ROUTE.
Module: kamailio
Branch: 5.0
Commit: ae575733a2761dba1232166f105eeb82781229e6
URL: https://github.com/kamailio/kamailio/commit/ae575733a2761dba1232166f105eeb8…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: 2017-11-24T10:58:57+02:00
modules/nathelper: check also transport protocol when determining
if ;alias parameter needs to be added by add_contact_alias() call
---
Modified: src/modules/nathelper/doc/nathelper_admin.xml
Modified: src/modules/nathelper/nathelper.c
---
Diff: https://github.com/kamailio/kamailio/commit/ae575733a2761dba1232166f105eeb8…
Patch: https://github.com/kamailio/kamailio/commit/ae575733a2761dba1232166f105eeb8…
---
diff --git a/src/modules/nathelper/doc/nathelper_admin.xml b/src/modules/nathelper/doc/nathelper_admin.xml
index d08f80c3a5..d7ea668e02 100644
--- a/src/modules/nathelper/doc/nathelper_admin.xml
+++ b/src/modules/nathelper/doc/nathelper_admin.xml
@@ -707,8 +707,8 @@ if(is_rfc1918("$rd")) {
the contact URI containing either received ip, port, and
transport protocol or those given as parameters. If called
without parameters, <quote>;alias</quote> parameter is
- only added if received ip and port differ from those in
- contact URI.
+ only added if received ip, port, or transport protocol differs
+ from that in contact URI.
</para>
<para>
This function can be used from
diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c
index 283e75c89b..642318d52b 100644
--- a/src/modules/nathelper/nathelper.c
+++ b/src/modules/nathelper/nathelper.c
@@ -799,11 +799,12 @@ add_contact_alias_0(struct sip_msg* msg)
LM_DBG("contact uri host is not an ip address\n");
} else {
if (ip_addr_cmp(ip, &(msg->rcv.src_ip)) &&
- ((msg->rcv.src_port == uri.port_no) ||
- ((uri.port.len == 0) && (msg->rcv.src_port == 5060)))) {
- LM_DBG("no need to add alias param\n");
- return 2;
- }
+ ((msg->rcv.src_port == uri.port_no) ||
+ ((uri.port.len == 0) && (msg->rcv.src_port == 5060))) &&
+ (uri.proto == msg->rcv.proto)) {
+ LM_DBG("no need to add alias param\n");
+ return 2;
+ }
}
/* Check if function has been called already */
Module: kamailio
Branch: 5.1
Commit: a7049edf431b8b8f8c80040b3b005c2e00d44eca
URL: https://github.com/kamailio/kamailio/commit/a7049edf431b8b8f8c80040b3b005c2…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: 2017-11-24T10:51:04+02:00
modules/nathelper: check also transport protocol when determining
if ;alias parameter needs to be added by add_contact_alias() call
(cherry picked from commit 93c81f5326acc2aefaca01c347f79c972727d0bf)
---
Modified: src/modules/nathelper/doc/nathelper_admin.xml
Modified: src/modules/nathelper/nathelper.c
---
Diff: https://github.com/kamailio/kamailio/commit/a7049edf431b8b8f8c80040b3b005c2…
Patch: https://github.com/kamailio/kamailio/commit/a7049edf431b8b8f8c80040b3b005c2…
---
diff --git a/src/modules/nathelper/doc/nathelper_admin.xml b/src/modules/nathelper/doc/nathelper_admin.xml
index 9c3373a9ec..c032fc3a84 100644
--- a/src/modules/nathelper/doc/nathelper_admin.xml
+++ b/src/modules/nathelper/doc/nathelper_admin.xml
@@ -707,8 +707,8 @@ if(is_rfc1918("$rd")) {
the contact URI containing either received ip, port, and
transport protocol or those given as parameters. If called
without parameters, <quote>;alias</quote> parameter is
- only added if received ip and port differ from those in
- contact URI.
+ only added if received ip, port, or transport protocol differs
+ from that in contact URI.
</para>
<para>
This function can be used from
diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c
index a34d0a19dd..5e7b82b617 100644
--- a/src/modules/nathelper/nathelper.c
+++ b/src/modules/nathelper/nathelper.c
@@ -780,13 +780,13 @@ static int add_contact_alias_0(struct sip_msg *msg)
&& ((ip = str2ip6(&(uri.host))) == NULL)) {
LM_DBG("contact uri host is not an ip address\n");
} else {
- if(ip_addr_cmp(ip, &(msg->rcv.src_ip))
- && ((msg->rcv.src_port == uri.port_no)
- || ((uri.port.len == 0)
- && (msg->rcv.src_port == 5060)))) {
- LM_DBG("no need to add alias param\n");
- return 2;
- }
+ if (ip_addr_cmp(ip, &(msg->rcv.src_ip)) &&
+ ((msg->rcv.src_port == uri.port_no) ||
+ ((uri.port.len == 0) && (msg->rcv.src_port == 5060))) &&
+ (uri.proto == msg->rcv.proto)) {
+ LM_DBG("no need to add alias param\n");
+ return 2;
+ }
}
/* Check if function has been called already */
Module: kamailio
Branch: master
Commit: b79f3e3308786b86864abaddb75e06587722ef6c
URL: https://github.com/kamailio/kamailio/commit/b79f3e3308786b86864abaddb75e065…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-11-24T09:31:56+01:00
modules: readme files regenerated - nathelper ... [skip ci]
---
Modified: src/modules/nathelper/README
---
Diff: https://github.com/kamailio/kamailio/commit/b79f3e3308786b86864abaddb75e065…
Patch: https://github.com/kamailio/kamailio/commit/b79f3e3308786b86864abaddb75e065…
---
diff --git a/src/modules/nathelper/README b/src/modules/nathelper/README
index 2b12e8c67c..867e7aad88 100644
--- a/src/modules/nathelper/README
+++ b/src/modules/nathelper/README
@@ -612,7 +612,8 @@ if(is_rfc1918("$rd")) {
Adds an “;alias=ip~port~transport” parameter to the contact URI
containing either received ip, port, and transport protocol or those
given as parameters. If called without parameters, “;alias” parameter
- is only added if received ip and port differ from those in contact URI.
+ is only added if received ip, port, or transport protocol differs from
+ that in contact URI.
This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
BRANCH_ROUTE, and LOCAL_ROUTE.
Module: kamailio
Branch: master
Commit: 93c81f5326acc2aefaca01c347f79c972727d0bf
URL: https://github.com/kamailio/kamailio/commit/93c81f5326acc2aefaca01c347f79c9…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: 2017-11-24T10:18:33+02:00
modules/nathelper: check also transport protocol when determining
if ;alias parameter needs to be added by add_contact_alias() call
---
Modified: src/modules/nathelper/doc/nathelper_admin.xml
Modified: src/modules/nathelper/nathelper.c
---
Diff: https://github.com/kamailio/kamailio/commit/93c81f5326acc2aefaca01c347f79c9…
Patch: https://github.com/kamailio/kamailio/commit/93c81f5326acc2aefaca01c347f79c9…
---
diff --git a/src/modules/nathelper/doc/nathelper_admin.xml b/src/modules/nathelper/doc/nathelper_admin.xml
index 9c3373a9ec..c032fc3a84 100644
--- a/src/modules/nathelper/doc/nathelper_admin.xml
+++ b/src/modules/nathelper/doc/nathelper_admin.xml
@@ -707,8 +707,8 @@ if(is_rfc1918("$rd")) {
the contact URI containing either received ip, port, and
transport protocol or those given as parameters. If called
without parameters, <quote>;alias</quote> parameter is
- only added if received ip and port differ from those in
- contact URI.
+ only added if received ip, port, or transport protocol differs
+ from that in contact URI.
</para>
<para>
This function can be used from
diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c
index a34d0a19dd..5e7b82b617 100644
--- a/src/modules/nathelper/nathelper.c
+++ b/src/modules/nathelper/nathelper.c
@@ -780,13 +780,13 @@ static int add_contact_alias_0(struct sip_msg *msg)
&& ((ip = str2ip6(&(uri.host))) == NULL)) {
LM_DBG("contact uri host is not an ip address\n");
} else {
- if(ip_addr_cmp(ip, &(msg->rcv.src_ip))
- && ((msg->rcv.src_port == uri.port_no)
- || ((uri.port.len == 0)
- && (msg->rcv.src_port == 5060)))) {
- LM_DBG("no need to add alias param\n");
- return 2;
- }
+ if (ip_addr_cmp(ip, &(msg->rcv.src_ip)) &&
+ ((msg->rcv.src_port == uri.port_no) ||
+ ((uri.port.len == 0) && (msg->rcv.src_port == 5060))) &&
+ (uri.proto == msg->rcv.proto)) {
+ LM_DBG("no need to add alias param\n");
+ return 2;
+ }
}
/* Check if function has been called already */