[sr-dev] git:4.1: nathelper: use dedicated function for testing via address against source ip

Daniel-Constantin Mierla miconda at gmail.com
Mon Dec 1 12:00:21 CET 2014


Module: sip-router
Branch: 4.1
Commit: 01824551d36a12a62b7bf64ee62df78a5f2d6111
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=01824551d36a12a62b7bf64ee62df78a5f2d6111

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Mon Dec  1 11:48:39 2014 +0100

nathelper: use dedicated function for testing via address against source ip

- reported by Igor Potjevlesch
- previous used functions was checking the presence of rport and
  received parameters, ending in a wrong result for nat testing

(cherry picked from commit 0b10377df11977d7ddd7e6bf30fe060d1fe200aa)
(cherry picked from commit a2832bf95bf0fa4e866ee4a04cabe944d5374ffb)

---

 modules/nathelper/nathelper.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/nathelper/nathelper.c b/modules/nathelper/nathelper.c
index 9a76550..833f651 100644
--- a/modules/nathelper/nathelper.c
+++ b/modules/nathelper/nathelper.c
@@ -1567,7 +1567,7 @@ nat_uac_test_f(struct sip_msg* msg, char* str1, char* str2)
 	 * test if source address of signaling is different from
 	 * address advertised in Via
 	 */
-	if ((tests & NAT_UAC_TEST_RCVD) && received_test(msg))
+	if ((tests & NAT_UAC_TEST_RCVD) && received_via_test(msg))
 		return 1;
 	/*
 	 * test for occurrences of RFC1918 addresses in Contact




More information about the sr-dev mailing list