[Dnsmasq-discuss] DHCPv6 with IPv4 address in last 32 bits of IPv6 address: ideas?

Simon Kelley simon at thekelleys.org.uk
Thu Apr 23 23:29:24 BST 2020



On 23/04/2020 20:49, Simon Kelley wrote:
> 

> According to RFC 4291 Para 2.2, a mixed representation is possible, for
> instance ipv6-mapped IPv4 addresses can be written as
> 
> ::ffff.1.2.3.4
> 
> So you could use something like 2a01:ac00::$something:98.98.98.98
> 
> and not have problems if octets in your address are greater than 99.
> 
> Dnsmasq uses the standard libc address-parsing functions which should
> support this format, BUT the option parsing code may have difficulty
> recognizing such addresses as IPv6 addresses, I shall take a look......
> 
> 


Replying to myself, the mixed-mode IPv6 address representation works in
dhcp-host, so

dhcp-host=hostname,98.98,98.98,[2a01:ac00::$something:98.98.98.98]

works fine.

Such addresses don't work in dhcp-option, but I just pushed a patch to
the git repo which addresses that.


Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list