dhcpv6 hardware ethernet
I spent a lot of time figuring out what is up with static address configuration by MAC address and from what I know now with the current state of ISC dhcpd it is not possible to reliably configure a static IPv6 address for a client by MAC address. The code contains a reference to an issue in the old bug tracker, rt41523, that is not publicly visible. So decided to find a way to make it work despite the socket API not providing the MAC address for a received packet.
I have pushed a prototype implementation of this here, but my knowledge about and experience w ith C, autoconf and automake is insufficient to create a high-quality patch for upstreaming.
Commit description:
IPv4 DHCP headers contain the MAC address of the client, but this is not
the case for DHCPv6. Depending on the client configuration and relays, the MAC
address can be extracted from the DUID or relay options, but in some
setups it was not possible to set a "fixed-address6" for a "hardware ethernet".
The socket api used by default on most Linux installations does not give
access to the MAC address the packet was received from, so setting the haddr
field of the packet is not easily possible.
This implementation uses libnetlink from the iproute2 project to obtain a
mapping between IPv6 addresses and MAC addresses that is maintained by the
kernel.