mirror of
https://github.com/rancher/os.git
synced 2025-09-12 13:17:17 +00:00
Don't make IPv4LL and Addresses mutally exclusive
This commit is contained in:
committed by
Sven Dowideit
parent
b5fdd63a85
commit
e4c2271c6b
@@ -325,22 +325,22 @@ func applyInterfaceConfig(link netlink.Link, netConf InterfaceConfig) error {
|
|||||||
log.Errorf("IPV4LL set failed: %v", err)
|
log.Errorf("IPV4LL set failed: %v", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
addresses := []string{}
|
|
||||||
|
|
||||||
if netConf.Address != "" {
|
addresses := []string{}
|
||||||
addresses = append(addresses, netConf.Address)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(netConf.Addresses) > 0 {
|
if netConf.Address != "" {
|
||||||
addresses = append(addresses, netConf.Addresses...)
|
addresses = append(addresses, netConf.Address)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, address := range addresses {
|
if len(netConf.Addresses) > 0 {
|
||||||
err := applyAddress(address, link, netConf)
|
addresses = append(addresses, netConf.Addresses...)
|
||||||
if err != nil {
|
}
|
||||||
log.Errorf("Failed to apply address %s to %s: %v", address, link.Attrs().Name, err)
|
|
||||||
}
|
for _, address := range addresses {
|
||||||
|
err := applyAddress(address, link, netConf)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("Failed to apply address %s to %s: %v", address, link.Attrs().Name, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user