mirror of
https://github.com/siderolabs/talos.git
synced 2025-10-27 06:21:11 +01:00
fix: only set gateway if set in context (opennebula)
Fix the network config setup. Signed-off-by: Christian WALDBILLIG <christian@waldbillig.io> Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
parent
4575dd8e74
commit
c79d69c2e2
@ -127,6 +127,7 @@ func (o *OpenNebula) ParseMetadata(st state.State, oneContextPlain []byte) (*run
|
||||
},
|
||||
)
|
||||
|
||||
if oneContext[ifaceName+"_GATEWAY"] != "" {
|
||||
// Parse gateway address and create RouteSpecSpec entry
|
||||
gateway, err := netip.ParseAddr(oneContext[ifaceName+"_GATEWAY"])
|
||||
if err != nil {
|
||||
@ -147,6 +148,7 @@ func (o *OpenNebula) ParseMetadata(st state.State, oneContextPlain []byte) (*run
|
||||
route.Normalize()
|
||||
|
||||
networkConfig.Routes = append(networkConfig.Routes, route)
|
||||
}
|
||||
|
||||
// Parse DNS servers
|
||||
dnsServers := strings.Fields(oneContext[ifaceName+"_DNS"])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user