[sr-dev] git:4.0: modules/lcr: fixed checking of IPv4 address in to_any_gw_2 function

Juha Heinanen jh at tutpro.com
Wed Sep 18 07:30:51 CEST 2013


Module: sip-router
Branch: 4.0
Commit: 8ffa88060ebfd0634c0cebfea43189a8e1545b4b
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8ffa88060ebfd0634c0cebfea43189a8e1545b4b

Author: Juha Heinanen <jh at tutpro.com>
Committer: Juha Heinanen <jh at tutpro.com>
Date:   Wed Sep 18 08:29:41 2013 +0300

modules/lcr: fixed checking of IPv4 address in to_any_gw_2 function

---

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

diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c
index b204721..ae2429f 100644
--- a/modules/lcr/lcr_mod.c
+++ b/modules/lcr/lcr_mod.c
@@ -2676,7 +2676,7 @@ static int to_any_gw_2(struct sip_msg* _m, char* _addr, char* _transport)
     if ((ip = str2ip(&addr_str)) != NULL)
 	dst_addr = *ip;
 #ifdef USE_IPV6
-    if ((ip = str2ip6(&addr_str)) != NULL)
+    else if ((ip = str2ip6(&addr_str)) != NULL)
 	dst_addr = *ip;
 #endif
     else {




More information about the sr-dev mailing list