Module: kamailio
Branch: master
Commit: 5957ba50c8da1c543272643994190ba015221432
URL:
https://github.com/kamailio/kamailio/commit/5957ba50c8da1c543272643994190ba…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-11-18T14:19:38+01:00
core: socket info - relocate ip address conversion for log message
---
Modified: src/core/socket_info.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5957ba50c8da1c543272643994190ba…
Patch:
https://github.com/kamailio/kamailio/commit/5957ba50c8da1c543272643994190ba…
---
diff --git a/src/core/socket_info.c b/src/core/socket_info.c
index 35b85d6be7f..566dbf830b1 100644
--- a/src/core/socket_info.c
+++ b/src/core/socket_info.c
@@ -1784,6 +1784,8 @@ int add_interfaces(char *if_name, int family, unsigned short port,
continue;
if(family && family != ifa->ifa_addr->sa_family)
continue;
+ sockaddr2ip_addr(&addr, (struct sockaddr *)ifa->ifa_addr);
+ tmp = ip_addr2a(&addr);
if(ifa->ifa_addr->sa_family == AF_INET6) {
struct sockaddr_in6 *caddr = (struct sockaddr_in6 *)ifa->ifa_addr;
if((sr_bind_ipv6_link_local & KSR_IPV6_LINK_LOCAL_SKIP)
@@ -1794,8 +1796,6 @@ int add_interfaces(char *if_name, int family, unsigned short port,
continue;
}
}
- sockaddr2ip_addr(&addr, (struct sockaddr *)ifa->ifa_addr);
- tmp = ip_addr2a(&addr);
if(ifa->ifa_flags & IFF_LOOPBACK)
flags = SI_IS_LO;
else