From 34c222586c1ee4790ce3ff86a2ffb27c666c0662 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 4 Jul 2012 13:29:25 +0200 Subject: Fix crash when interface doesn't have an address * This is similar to the code in ipa_dyndns_update_send() --- src/providers/ldap/sdap_async_sudo_hostinfo.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/providers/ldap/sdap_async_sudo_hostinfo.c') diff --git a/src/providers/ldap/sdap_async_sudo_hostinfo.c b/src/providers/ldap/sdap_async_sudo_hostinfo.c index d219d8830..99a9bc77a 100644 --- a/src/providers/ldap/sdap_async_sudo_hostinfo.c +++ b/src/providers/ldap/sdap_async_sudo_hostinfo.c @@ -159,6 +159,9 @@ static int sdap_sudo_get_ip_addresses(TALLOC_CTX *mem_ctx, char ***_ip_addr_list } for (iface = ifaces; iface != NULL; iface = iface->ifa_next) { + /* Some interfaces don't have an ifa_addr */ + if (!iface->ifa_addr) continue; + netmask = 0; switch (iface->ifa_addr->sa_family) { case AF_INET: -- cgit