set some route flags
This commit is contained in:
parent
300ef18259
commit
9c20564afa
|
@ -729,6 +729,13 @@ int sigar_net_route_list_get(sigar_t *sigar,
|
|||
route->destination = ent->Dest;
|
||||
route->mask = ent->Mask;
|
||||
route->gateway = ent->NextHop;
|
||||
|
||||
route->flags = SIGAR_RTF_UP;
|
||||
if ((route->destination == 0) &&
|
||||
(route->mask == 0))
|
||||
{
|
||||
route->flags |= SIGAR_RTF_GATEWAY;
|
||||
}
|
||||
}
|
||||
|
||||
free(routes);
|
||||
|
|
|
@ -1725,6 +1725,13 @@ SIGAR_DECLARE(int) sigar_net_route_list_get(sigar_t *sigar,
|
|||
route->destination = ipr->dwForwardDest;
|
||||
route->mask = ipr->dwForwardMask;
|
||||
route->gateway = ipr->dwForwardNextHop;
|
||||
|
||||
route->flags = SIGAR_RTF_UP;
|
||||
if ((route->destination == 0) &&
|
||||
(route->mask == 0))
|
||||
{
|
||||
route->flags |= SIGAR_RTF_GATEWAY;
|
||||
}
|
||||
}
|
||||
|
||||
free(buffer);
|
||||
|
|
Loading…
Reference in New Issue