summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2012-07-04 13:29:25 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-07-06 11:44:45 -0400
commit34c222586c1ee4790ce3ff86a2ffb27c666c0662 (patch)
tree6fea1f016ab7cc02cf9337b8766c9d340f6a4e8d /src
parent5c9292bc86788f21274e1480acd2bbcc8a221b06 (diff)
downloadsssd-34c222586c1ee4790ce3ff86a2ffb27c666c0662.tar.gz
sssd-34c222586c1ee4790ce3ff86a2ffb27c666c0662.tar.bz2
sssd-34c222586c1ee4790ce3ff86a2ffb27c666c0662.zip
Fix crash when interface doesn't have an address
* This is similar to the code in ipa_dyndns_update_send()
Diffstat (limited to 'src')
-rw-r--r--src/providers/ldap/sdap_async_sudo_hostinfo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_async_sudo_hostinfo.c b/src/providers/ldap/sdap_async_sudo_hostinfo.c
index d219d883..99a9bc77 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: