improve fqdn_ip filters
This commit is contained in:
parent
508ea00374
commit
4e45608ce0
|
@ -1849,7 +1849,10 @@ static int fqdn_ip_get(sigar_t *sigar, char *name)
|
||||||
iflist.data[i], &ifconfig);
|
iflist.data[i], &ifconfig);
|
||||||
|
|
||||||
if ((status != SIGAR_OK) ||
|
if ((status != SIGAR_OK) ||
|
||||||
(ifconfig.flags & SIGAR_IFF_LOOPBACK))
|
(ifconfig.flags & SIGAR_IFF_LOOPBACK) ||
|
||||||
|
!ifconfig.address.addr.in || /* no ip address */
|
||||||
|
!ifconfig.hwaddr.addr.in || /* no mac address */
|
||||||
|
strchr(iflist.data[i], ':')) /* alias */
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue