device: don't require a hardware address for DHCPv6

DHCPv4 requires a hardware address, while DHCPv6 does not.

Anyway, the DHCP manager already checks that an address is available
when needed, so drop the check here.

Fixes: 58287cbcc0 ('core: rework IP configuration in NetworkManager using layer 3 configuration')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1228
This commit is contained in:
Beniamino Galvani 2022-05-16 17:53:51 +02:00
parent 3e5f0a0fa2
commit 9bc7278da3

View file

@ -10185,13 +10185,6 @@ _dev_ipdhcpx_start(NMDevice *self, int addr_family)
hwaddr = nmp_link_address_get_as_bytes(&pllink->l_address);
if (!IS_IPv4) {
if (!hwaddr) {
fail_reason = "interface has no MAC address to start DHCPv6";
goto out_fail;
}
}
request_broadcast = FALSE;
if (pllink) {
str = nmp_object_link_udev_device_get_property_value(NMP_OBJECT_UP_CAST(pllink),