it would be nice to get rid of these:
CC (cc) [M pike.so] pike_rpc.o
pike_rpc.c: In function ‘traverse_subtree’:
pike_rpc.c:40: warning: passing argument 3 of ‘pike_top_add_entry’ from incompatible pointer type
pike_top.h:19: note: expected ‘unsigned int *’ but argument is of type ‘short unsigned int *’
pike_rpc.c:40: warning: passing argument 4 of ‘pike_top_add_entry’ from incompatible pointer type
pike_top.h:19: note: expected ‘unsigned int *’ but argument is of type ‘short unsigned int *’
pike_rpc.c:43: warning: passing argument 3 of ‘pike_top_add_entry’ from incompatible pointer type
pike_top.h:19: note: expected ‘unsigned int *’ but argument is of type ‘short unsigned int *’
pike_rpc.c:43: warning: passing argument 4 of ‘pike_top_add_entry’ from incompatible pointer type
pike_top.h:19: note: expected ‘unsigned int *’ but argument is of type ‘short unsigned int *’
pike_rpc.c: In function ‘pike_top’:
pike_rpc.c:141: warning: statement with no effect
-- juha
Module: sip-router
Branch: pd/outbound
Commit: 83d07c9a0f883ba08f863103127b96893d1bc92b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=83d07c9…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sat Dec 22 11:04:04 2012 +0000
Merge branch 'master' into outbound
* master:
modules_k/domain: bind_domain api function takes one param
modules_k/htable: removed unused variable
nathelper(k): new test 128 to check port in contact against source port
modules_s/nathelper: moved to obsolete folder
nathelper(k): added the select for rewriting the contact
core: proper pv buffer reinitialization
dialog(k): Reworked dlg_set_timeout_by_profile() code to change dialog timeouts outside of a profile lock.
---
Module: sip-router
Branch: master
Commit: bf3acaf0895d900c15e3455cba225226f3debf62
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bf3acaf…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sat Dec 22 09:42:35 2012 +0100
nathelper(k): new test 128 to check port in contact against source port
- used for nat_uac_test()
- imported from ser flavour
---
modules_k/nathelper/README | 3 ++
modules_k/nathelper/doc/nathelper_admin.xml | 5 ++++
modules_k/nathelper/nathelper.c | 31 ++++++++++++++++++++++++++-
3 files changed, 38 insertions(+), 1 deletions(-)
diff --git a/modules_k/nathelper/README b/modules_k/nathelper/README
index a11f2f8..36c4629 100644
--- a/modules_k/nathelper/README
+++ b/modules_k/nathelper/README
@@ -503,6 +503,9 @@ fix_nated_register();
* 32 - test if the source IP address of signaling is a RFC1918
address
* 64 - test if the source connection of signaling is a WebSocket
+ * 128 - test if the Contact URI port differs from the source port of
+ the request (Warning: this is might be legal or even intended
+ combination in non natted scenarios)
All flags can be bitwise combined, the test returns true if any of the
tests identified a NAT.
diff --git a/modules_k/nathelper/doc/nathelper_admin.xml b/modules_k/nathelper/doc/nathelper_admin.xml
index bc4c8d7..ba8f866 100644
--- a/modules_k/nathelper/doc/nathelper_admin.xml
+++ b/modules_k/nathelper/doc/nathelper_admin.xml
@@ -570,6 +570,11 @@ fix_nated_register();
<emphasis>64</emphasis> - test if the source connection of
signaling is a WebSocket
</para></listitem>
+ <listitem><para>
+ <emphasis>128</emphasis> - test if the Contact URI port differs
+ from the source port of the request (Warning: this is might be legal
+ or even intended combination in non natted scenarios)
+ </para></listitem>
</itemizedlist>
<para>
All flags can be bitwise combined, the test returns true if any of
diff --git a/modules_k/nathelper/nathelper.c b/modules_k/nathelper/nathelper.c
index 9f72795..a38fea4 100644
--- a/modules_k/nathelper/nathelper.c
+++ b/modules_k/nathelper/nathelper.c
@@ -244,6 +244,7 @@ MODULE_VERSION
#define NAT_UAC_TEST_RPORT 0x10
#define NAT_UAC_TEST_O_1918 0x20
#define NAT_UAC_TEST_WS 0x40
+#define NAT_UAC_TEST_C_PORT 0x80
#define DEFAULT_RTPP_SET_ID 0
@@ -1397,6 +1398,27 @@ contact_1918(struct sip_msg* msg)
}
/*
+ * test if source port of signaling is different from
+ * port advertised in Contact
+ */
+static int
+contact_rport(struct sip_msg* msg)
+{
+ struct sip_uri uri;
+ contact_t* c;
+
+ if (get_contact_uri(msg, &uri, &c) == -1) {
+ return -1;
+ }
+
+ if (msg->rcv.src_port != (uri.port_no ? uri.port_no : SIP_PORT)) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+/*
* test for occurrence of RFC1918 IP address in SDP
*/
static int
@@ -1496,12 +1518,19 @@ nat_uac_test_f(struct sip_msg* msg, char* str1, char* str2)
return 1;
/*
- * tests prototype to check whether the message arrived on a WebSocket
+ * test prototype to check whether the message arrived on a WebSocket
*/
if ((tests & NAT_UAC_TEST_WS)
&& (msg->rcv.proto == PROTO_WS || msg->rcv.proto == PROTO_WSS))
return 1;
+ /*
+ * test if source port of signaling is different from
+ * port advertised in Contact
+ */
+ if ((tests & NAT_UAC_TEST_C_PORT) && (contact_rport(msg) > 0))
+ return 1;
+
/* no test succeeded */
return -1;
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task is now closed:
FS#259 - pv_buffer_slots generates seg fault
User who did this - Daniel-Constantin Mierla (miconda)
Reason for closing: Fixed
Additional comments about closing: Patch in master branch.
More information can be found at the following URL:
https://sip-router.org/tracker/index.php?do=details&task_id=259
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.