[SIGAR-5] Fix netinfo default gateway

This commit is contained in:
Doug MacEachern committed 2006-06-09 17:42:46 +00:00
1 parent ec58e28f34
commit 071ca22aba
2 files changed
+8 -1

No files matched your search

+3 -1
View File
@@ -927,7 +927,9 @@ static int sigar_get_default_gateway(sigar_t *sigar,
}
for (i=0; i<routelist.number; i++) {
if (routelist.data[i].flags & SIGAR_RTF_GATEWAY) {
if ((routelist.data[i].flags & SIGAR_RTF_GATEWAY) &&
(routelist.data[i].destination == 0))
{
sigar_inet_ntoa(sigar,
routelist.data[i].gateway, gateway);
break;