Merge pull request #981 from arthur-zhang/dev-revert

revert some code in pr 962
This commit is contained in:
Casey Callendrello 2023-11-16 13:39:59 +01:00 committed by GitHub
commit 333fc9a0d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,7 +240,7 @@ func calcGateways(result *current.Result, n *NetConf) (*gwInfo, *gwInfo, error)
// Add a default route for this family using the current
// gateway address if necessary.
if n.IsDefaultGW {
if n.IsDefaultGW && !gws.defaultRouteFound {
for _, route := range result.Routes {
if route.GW != nil && defaultNet.String() == route.Dst.String() {
gws.defaultRouteFound = true