mirror of
https://github.com/rancher/os.git
synced 2025-09-01 06:40:31 +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)
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
addresses := []string{}
|
||||
}
|
||||
|
||||
if netConf.Address != "" {
|
||||
addresses = append(addresses, netConf.Address)
|
||||
}
|
||||
addresses := []string{}
|
||||
|
||||
if len(netConf.Addresses) > 0 {
|
||||
addresses = append(addresses, netConf.Addresses...)
|
||||
}
|
||||
if netConf.Address != "" {
|
||||
addresses = append(addresses, netConf.Address)
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
if len(netConf.Addresses) > 0 {
|
||||
addresses = append(addresses, netConf.Addresses...)
|
||||
}
|
||||
|
||||
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