1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-26 03:19:52 +03:00

Merge pull request #1659 from domosekai/route6

This commit is contained in:
Yihong Wu 2022-09-16 20:01:55 +09:00 committed by GitHub
commit e4f9abba1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -9414,7 +9414,15 @@ RETRY:
{
e = ZeroMallocFast(sizeof(ROUTE_ENTRY));
Win32IpForwardRow2ToRouteEntry(e, &p->Table[i]);
Add(o, e);
if (e->Active)
{
Add(o, e);
}
else
{
FreeRouteEntry(e);
}
}
FreeMibTable(p);
@ -9573,6 +9581,7 @@ void Win32IpForwardRow2ToRouteEntry(ROUTE_ENTRY *entry, void *ip_forward_row)
{
entry->IfMetric = p->Metric;
entry->Metric = r->Metric + p->Metric;
entry->Active = p->Connected;
}
else
{

View File

@ -293,6 +293,7 @@ struct ROUTE_ENTRY
UINT IfMetric;
UINT InterfaceID;
UINT64 InnerScore;
bool Active;
};
// Routing table