[SIGAR-83] skip comment lines in resolv.conf
This commit is contained in:
parent
4c522ad7ed
commit
2959b4a4ea
|
@ -1242,7 +1242,9 @@ int sigar_net_info_get(sigar_t *sigar,
|
|||
int len;
|
||||
|
||||
SIGAR_SKIP_SPACE(ptr);
|
||||
if (!(ptr = strstr(ptr, "nameserver"))) {
|
||||
if ((*ptr == '#') ||
|
||||
!(ptr = strstr(ptr, "nameserver")))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
ptr += 10;
|
||||
|
|
Loading…
Reference in New Issue