odhcp misbehaves with multiple MACs for single host on DHCP configuration
Username: dllud
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=2056
According to the
Static Leases section on DHCP's User Guide
it should be possible to list several MAC addresses for the same host. Indeed everything works as expected with
dnsmasq
, and my host gets the expected IPv4 when using any of the listed MAC addresses.
However
odhcp
misbehaves when I list more than one MAC. With a single MAC on ‘option mac’, my host gets the expected IPv6, with the suffix defined under hostid. If I place two or more MACs on that option, odhcp fails to honor my rules and attributes a dynamic IPv6 with a random suffix.
Here is an example config that produces the erroneous behavior of odhcp.
config host option name 'host4' option ip '192.168.1.4' option hostid '4' option duid '00112233445566778899' option mac '00:11:22:33:44:55, 66:77:88:99:aa:bb'
(Separating the MACs list with either commas and spaces yields the same result. The DHCP User’s Guide has contradictory info on how the list should be separated, but it seems that both work for dnsmasq.)