[Dnsmasq-discuss] [PATCH v2] DHCPv6: Honor assigning IPv6 address based on MAC address
Geert Stappers
stappers at stappers.nl
Thu May 21 15:22:03 BST 2020
On Sun, May 03, 2020 at 01:23:15PM +0200, Pali Rohár wrote:
> Currently IPv6 addresses are assigned to tuple (IAID, DUID). When system
> changes IAID/DUID then old assigned IPv6 address cannot be reused, even
> when in config file was DHCPv6 assignment based on MAC address (and not on
> DUID).
>
> IAID/DUID is changed when rebooting from one operating system to another;
> or after reinstalling system. In reality it is normal that DUID of some
> machine is changed, so people rather assign also IPv6 addresses based on
> MAC address.
>
> So assigning IPv6 based on MAC address in dnsmasq is currently semi-broken.
How to reproduce that semi-brokenness?
> This patch tries to fix it and honors IPv6 config rules with MAC address,
> to always assign particular IPv6 address to specific MAC address (when
> configured). And ignores the fact if IAID/DUID was changed.
>
> Normally IPv6 address should be assigned by IAID/DUID (which also state
> DHCPv6 RFCs), but dnsmasq has already some support for assigning IPv6
> address based on MAC address, when users configured in config file.
>
> So this patch just tries to fix above problem for user configuration with
> MAC addresses. It does not change assignment based on DUID.
> ---
>
> This is my original patch rebased on top of current git master branch.
Acknowledge
> Previous email with this patch probably dropped into spambox
> and was not processed.
(unspoken words +
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2020q2/014018.html )
> So please let me know if now this email was correctly received.
Recieved the patch and was able to `git am` it.
It did compile and passed the unittests.
No further check was done. Mostly because not facing the problem that
patch submitter has. Probably some day I will, hence the above 'How to
reproduce that semi-brokenness?'
> src/rfc3315.c | 55 +++++++++++++++++++++++++++++++++++++++++++--------
> 1 file changed, 47 insertions(+), 8 deletions(-)
>
> diff --git a/src/rfc3315.c b/src/rfc3315.c
> index b3f0a0a..e588b13 100644
> --- a/src/rfc3315.c
> +++ b/src/rfc3315.c
... 142 lines of actual patch ...
Groeten
Geert Stappers
--
Silence is hard to parse
More information about the Dnsmasq-discuss
mailing list