<div dir="ltr"><div><div><div><div><div>Hi dnsmasq guys.<br></div><br></div>I'm Yuki Nishiwaki.<br>Recently I started to work on dnsmasq stuff. I could ask stupid thing though I want to ask if anyone think the same thing as me.<br></div><br></div>I'm using dnsmasq under cloud controller and dnsmasq have responsibility to lease IP for <br>our all virtual machines connected to Host via tap on the same host running dnsmasq. <br></div><div><br></div><div>In order to do that, I had to specify same number of --dhcp-range as the number of subnet VM belong to but <br>we can not add dynamically "--dhcp-range" and I don't wanna restart everytime new subnet added.<br><br>So I was going to specify "--dhcp-range=0.0.0.0,static,0.0.0.0"  or "--dhcp-range=0.0.0.0,static,128.0.0.0, --dhcp-range=128.0.0.0,static,128.0.0.0" to<br>support all subnets possibly will be added in the future and lease IP for only known client. <br>It kind of worked but the netmask of leased IP was the same as dhcp-range specified(/1).  <br>I expected the netmask will be got from the NIC receiving DHCP request and dhcp-range's netmask is only used for judging if dnsmasq should reply or not.<br><br></div><div>After read the code around <a href="https://github.com/imp/dnsmasq/blob/master/src/dhcp.c#L501-L561">https://github.com/imp/dnsmasq/blob/master/src/dhcp.c#L501-L561</a>, I understood why I can not.<br></div><div>But If there is any chance I can add new option or other behaviour to cover my usecase<br>so that dnsmasq can use the netmask of NIC's IP receiving DHCP request for the IP to be leased while the netmask dhcp-range specified is used to judge whether<br>dnsmasq should reply or not, I'm willing to write the patch but<br>beforehand I want to ask what do you think about such additional change. Is this good approach, feature or bad approach, feature nobody want but me? <br></div><div><br><br></div><div>Regards<br><br></div><div>Yuki Nishiwaki<br></div></div>