mirror of
https://github.com/siderolabs/talos.git
synced 2025-10-27 14:31: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
|
// Parse gateway address and create RouteSpecSpec entry
|
||||||
gateway, err := netip.ParseAddr(oneContext[ifaceName+"_GATEWAY"])
|
gateway, err := netip.ParseAddr(oneContext[ifaceName+"_GATEWAY"])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -147,6 +148,7 @@ func (o *OpenNebula) ParseMetadata(st state.State, oneContextPlain []byte) (*run
|
|||||||
route.Normalize()
|
route.Normalize()
|
||||||
|
|
||||||
networkConfig.Routes = append(networkConfig.Routes, route)
|
networkConfig.Routes = append(networkConfig.Routes, route)
|
||||||
|
}
|
||||||
|
|
||||||
// Parse DNS servers
|
// Parse DNS servers
|
||||||
dnsServers := strings.Fields(oneContext[ifaceName+"_DNS"])
|
dnsServers := strings.Fields(oneContext[ifaceName+"_DNS"])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user