[Dnsmasq-discuss] Requested address bypasses netids
Cédric Duval
cedricduval at free.fr
Tue Nov 13 16:31:06 GMT 2007
Hi,
whenever a client sends a DISCOVER and uses the option 50 to
request an IP address (and provided a dhcp-host clause or an
existing lease did not match before), he is granted this
address if it is valid for a context, regardless of the
netids.
>From rfc2131.c:714,
else if (opt && address_available(context, addr)
&& !lease_find_by_addr(addr)
&& !config_find_by_address(daemon->dhcp_conf, addr))
mess->yiaddr = addr;
I have a 'default' range and a range matching a netid, let's say:
dhcp-range=192.168.1.11,192.168.1.200,1h
dhcp-range=net:net1,192.168.1.201,192.168.1.210,1h
Now, if I have a client matching 'net1' (through setting one vendor
option), two cases:
- the client does not use the option 50, then everything is
fine: an address is given from the net1 context.
- the client uses the option 50 to request an address within
the 'default' range, and... he gets what he asks for.
Which is not fine IMHO, since the context which matches the
netid should have the priority over the one without a netid.
Any opinion on this?
Thanks,
--
Cédric
More information about the Dnsmasq-discuss
mailing list