revert some code in pr 962
Signed-off-by: arthur-zhang <zhangya_no1@qq.com>
This commit is contained in:
parent
93a1b3d0e7
commit
f90ac41ae4
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user