Commit 3144e58c authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête
Browse files

interfaces: skip unhandled interface families early

We handle interfaces of type AF_INET or AF_INET6 only, so discard other
families before calling sockaddr_to_string() on them, for example
parent c9d0f0f5
Pipeline #243746 passed with stages
in 17 minutes and 10 seconds
......@@ -388,6 +388,10 @@ nice_interfaces_get_local_ips (gboolean include_loopback)
if (ifa->ifa_addr == NULL)
if (ifa->ifa_addr->sa_family != AF_INET &&
ifa->ifa_addr->sa_family != AF_INET6)
/* Convert to a string. */
addr_string = sockaddr_to_string (ifa->ifa_addr);
if (addr_string == NULL) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment