diff options
author | Stef Walter <stefw@gnome.org> | 2012-07-04 13:29:25 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-07-06 11:44:45 -0400 |
commit | 34c222586c1ee4790ce3ff86a2ffb27c666c0662 (patch) | |
tree | 6fea1f016ab7cc02cf9337b8766c9d340f6a4e8d /src | |
parent | 5c9292bc86788f21274e1480acd2bbcc8a221b06 (diff) | |
download | sssd-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.c | 3 |
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: |