NET-1224:add egressGW ip for setroutes (#2933)

* add egressGW ip for setroutes

* fix peer endpoint selection

---------

Co-authored-by: abhishek9686 <abhi281342@gmail.com>
This commit is contained in:
Max Ma
2024-05-14 16:26:24 +02:00
committed by GitHub
parent faf50c8c3d
commit 6dc881260f
3 changed files with 20 additions and 14 deletions

View File

@@ -475,6 +475,9 @@ func getExtpeersExtraRoutes(network string) (egressRoutes []models.EgressNetwork
return
}
for _, extPeer := range extPeers {
if len(extPeer.ExtraAllowedIPs) == 0 {
continue
}
egressRoutes = append(egressRoutes, getExtPeerEgressRoute(extPeer)...)
}
return