diff --git a/src/sigar.c b/src/sigar.c index 70abef66..9dd1c6bc 100644 --- a/src/sigar.c +++ b/src/sigar.c @@ -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;