From fec4f63f0c7eade8b6b771a82d0ee10480901dd2 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 22 Feb 2023 01:46:33 +0100 Subject: [PATCH] Workaround issue with multiple interfaces --- src/proxy.c | 8 ++++++++ src/utils.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/proxy.c b/src/proxy.c index fc1d1ca..d4dd46f 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -354,6 +354,7 @@ sts=sip_obscure_callid(ticket); if (is_empty_sockaddr(&ticket->next_hop) == STS_FAILURE) { DEBUGC(DBCLASS_PROXY, "proxy_request: pre-set next-hop: %s:%i", utils_inet_ntoa(ticket->next_hop.sin_addr), ticket->next_hop.sin_port); +#if 0 /* FIXME khorben */ /* * Route present? * If so, fetch address from topmost Route: header and remove it. @@ -368,6 +369,7 @@ sts=sip_obscure_callid(ticket); } DEBUGC(DBCLASS_PROXY, "proxy_request: have Route header to %s:%i", utils_inet_ntoa(ticket->next_hop.sin_addr), ticket->next_hop.sin_port); +#endif /* * fixed or domain outbound proxy defined ? */ @@ -379,6 +381,12 @@ sts=sip_obscure_callid(ticket); * destination from SIP URI */ } else { + if (!osip_list_eol(&(request->routes), 0)) { + while (!osip_list_eol(&(request->routes), 0)) { + osip_list_remove(&(request->routes), 0); + } + } + /* get the destination from the SIP URI */ /* 1) try SRV record */ diff --git a/src/utils.c b/src/utils.c index 831b655..1ca1534 100644 --- a/src/utils.c +++ b/src/utils.c @@ -497,7 +497,9 @@ int get_ip_by_ifname(char *ifname, struct in_addr *retaddr) { ifflags=ifa->ifa_flags; DEBUGC(DBCLASS_BABBLE,"getifaddrs - MATCH, sin_addr=%s", utils_inet_ntoa(ifaddr)); +#if 0 break; +#endif } } freeifaddrs(ifa_list);