[sr-dev] git:master:52cb53b2: nathelper: better condition for no more params in handle_ruri_alias_mode()

Daniel-Constantin Mierla miconda at gmail.com
Tue Aug 10 10:44:51 CEST 2021


Module: kamailio
Branch: master
Commit: 52cb53b29a5a624031a7d06504afecca7c25511e
URL: https://github.com/kamailio/kamailio/commit/52cb53b29a5a624031a7d06504afecca7c25511e

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-08-10T10:31:10+02:00

nathelper: better condition for no more params in handle_ruri_alias_mode()

---

Modified: src/modules/nathelper/nathelper.c

---

Diff:  https://github.com/kamailio/kamailio/commit/52cb53b29a5a624031a7d06504afecca7c25511e.diff
Patch: https://github.com/kamailio/kamailio/commit/52cb53b29a5a624031a7d06504afecca7c25511e.patch

---

diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c
index bdf1b7777a..bd71eaafc4 100644
--- a/src/modules/nathelper/nathelper.c
+++ b/src/modules/nathelper/nathelper.c
@@ -1156,9 +1156,9 @@ static int ki_handle_ruri_alias_mode(struct sip_msg *msg, int mode)
 			rest_len = rest_len - ALIAS_LEN;
 		}
 		sep = memchr(rest, 59 /* ; */, rest_len);
-		if(sep == NULL && start == NULL) {
-			LM_DBG("no alias param\n");
-			return 2;
+		if(sep == NULL) {
+			/* no other parameters */
+			break;
 		} else {
 			rest_len = rest_len - (sep - rest + 1);
 			rest = sep + 1;




More information about the sr-dev mailing list