mac | string | no | (none) | The hardware address(es) of this host, separated by spaces.
This explicitly allows to define leases with multiple MAC addresses. However, /odhcpd/ skips such /leases/ during configuration.
Here's the code fragment which handles MAC addresses of static leases in set_lease(..) (found in config.c):
if ((c = tb[LEASE_ATTR_MAC]))
if (!ether_aton_r(blobmsg_get_string(c), &l->mac))
goto err;
As can be seen, the code doesn't have any special handling for the multiple MAC case. So ether_aton_r(..) returns NULL which triggers goto err; and the lease doesn't make it into /leases/.
In https://openwrt.org/docs/guide-user/base-system/dhcp#static_leases, OpenWrt defines the /mac/ option of a DHCP Static Lease as:
This explicitly allows to define leases with multiple MAC addresses. However, /odhcpd/ skips such /leases/ during configuration.
Here's the code fragment which handles MAC addresses of static leases in
set_lease(..)
(found inconfig.c
):As can be seen, the code doesn't have any special handling for the multiple MAC case. So
ether_aton_r(..)
returnsNULL
which triggersgoto err;
and the lease doesn't make it into /leases/.