bridge: remove useless check

gws.defaultRouteFound here is always false.

Signed-off-by: arthur-zhang <zhangya_no1@qq.com>
This commit is contained in:
arthur-zhang
2023-11-13 17:11:21 +01:00
committed by Casey Callendrello
parent 2eee7cef35
commit 8c59fc1eea
+1 -1
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 && !gws.defaultRouteFound {
if n.IsDefaultGW {
for _, route := range result.Routes {
if route.GW != nil && defaultNet.String() == route.Dst.String() {
gws.defaultRouteFound = true