diff --git a/internal/app/networkd/pkg/networkd/networkd.go b/internal/app/networkd/pkg/networkd/networkd.go index 379191133..e4dc334f3 100644 --- a/internal/app/networkd/pkg/networkd/networkd.go +++ b/internal/app/networkd/pkg/networkd/networkd.go @@ -310,6 +310,7 @@ func (n *Networkd) decideHostname() (hostname, domainname string, address net.IP // Loop through address responses and use the first hostname // and address response. +outer: for _, intName := range interfaceNames { iface := n.Interfaces[intName] @@ -329,7 +330,7 @@ func (n *Networkd) decideHostname() (hostname, domainname string, address net.IP address = method.Address().IP - break + break outer } } } diff --git a/internal/app/networkd/pkg/networkd/networkd_test.go b/internal/app/networkd/pkg/networkd/networkd_test.go index c51ca6ef3..119300e66 100644 --- a/internal/app/networkd/pkg/networkd/networkd_test.go +++ b/internal/app/networkd/pkg/networkd/networkd_test.go @@ -199,6 +199,11 @@ func dhcpConfigFile() config.Provider { { DeviceInterface: "eth0", }, + { + DeviceInterface: "eth1", + DeviceCIDR: "192.168.0.10/24", + DeviceMTU: 9100, + }, }, }, },