<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;
        mso-ligatures:standardcontextual;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#467886;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have run into an issue described in a couple previous threads:<o:p></o:p></p>
<p class="MsoNormal"><a href="https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2021q4/015997.html">https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2021q4/015997.html</a><o:p></o:p></p>
<p class="MsoNormal"><a href="https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2022q3/016526.html">https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2022q3/016526.html</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As a summary, if two clients get served the same IP from dnsmasq DHCP, dnsmasq will serve a NAK to the second client. Good client software should just retry on this condition, but unfortunately getting served a NAK causes bugs in some PXE
 firmware.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve attached a patch to add a new option: `dhcp-hold-offered`, which creates a short (30s) lease on a DHCP offer. I don’t think it makes sense to change the behavior of dnsmasq unconditionally to get around this issue, as this is working
 around a bug in external software. This is a small update allowing users to have a workaround for this issue.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here is some data of the lease file from testing (running `watch -n 1 cat /<b>var</b>/lib/misc/dnsmasq.leases`):<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I see the initial short lease get created:<o:p></o:p></p>
<p class="MsoNormal">1790020329 {MAC1} {IP1} * *<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The lease is respected, and the second server is given the next IP in range:<o:p></o:p></p>
<p class="MsoNormal">1790020333 {MAC2} {IP2} * *<o:p></o:p></p>
<p class="MsoNormal">1790020329 {MAC1} {IP1} * *<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Both servers end up with their full lease (30m in this case):<o:p></o:p></p>
<p class="MsoNormal">1790022110 {MAC2} {IP2} * *<o:p></o:p></p>
<p class="MsoNormal">1790022110 {MAC1} {IP1} * *<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Let me know if you can look at the patch. Here is the source commit:<o:p></o:p></p>
<p class="MsoNormal"><a href="https://thekelleys.org.uk/gitweb-noai/?p=dnsmasq.git;a=commit;h=ad9208358eadcf747619511ec8b98134bf85a5f">https://thekelleys.org.uk/gitweb-noai/?p=dnsmasq.git;a=commit;h=ad9208358eadcf747619511ec8b98134bf85a5f</a>3<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Matt<o:p></o:p></p>
<p class="MsoNormal"><a href="mailto:Matthew.Harkness@spacex.com">Matthew.Harkness@spacex.com</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>