[Dnsmasq-discuss] Possible lease matching/reuse bug

john doe johndoe65534 at mail.com
Tue Sep 8 09:06:25 BST 2020


On 9/8/2020 9:19 AM, Jerome Vuarand wrote:
> Hi,
>
> I believe I'm triggering a bug where a static dhcp-host config does't
> seem to match the existing lease the second time that client connects.
>
> I'm running dnsmasq from a Raspberry Pi acting as a WiFi access point.
> I have a mixture of IoT devices connecting to it. I'd like most
> clients to get a dynamic IP address, but some to get a static one
> based on their name, so I use a combination of dhcp-range and
> dhcp-host. I have the following config:
>
> interface=ap0
> dhcp-range=192.168.4.100,192.168.4.250,255.255.255.0,24h
> domain=example.com
> dhcp-script=/home/pi/my_web_ui/dnsmasq_script
> dhcp-leasefile=/var/run/dnsmasq.leases
> dhcp-host=target
>
> And I have an entry in /etc/hosts that associate target to
> 192.168.4.2, the dnsmasq server itself is 192.168.4.1.
>

Are you seeing the same thing if you do:

'dhcp-host=target,192.168.4.2'


The above assumes that the hosts file does not contain the Ip in question.

--
John Doe



More information about the Dnsmasq-discuss mailing list