mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: wrong private static route format (#20091)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -165,7 +165,10 @@ func AddNicRoutes(routes [][]string, nicDesc *types.SServerNic, mainIp string, n
|
||||
} else if len(nicDesc.Gateway) > 0 && !isExitAddress(nicDesc.Ip) &&
|
||||
nicCnt == 2 && nicDesc.Ip != mainIp && isExitAddress(mainIp) {
|
||||
for _, pref := range netutils.GetPrivateIPRanges() {
|
||||
routes = addRoute(routes, pref.String(), nicDesc.Gateway)
|
||||
prefs := pref.ToPrefixes()
|
||||
for _, p := range prefs {
|
||||
routes = addRoute(routes, p.String(), nicDesc.Gateway)
|
||||
}
|
||||
}
|
||||
}
|
||||
return routes
|
||||
|
||||
Reference in New Issue
Block a user