Workaround issue with multiple interfaces

This commit is contained in:
Pierre Pronchery 2023-02-22 01:46:33 +01:00
parent 6125a27738
commit fec4f63f0c
2 changed files with 10 additions and 0 deletions

View File

@ -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 */

View File

@ -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);