<div dir="ltr"><div>Hi all,</div><div><br></div><div>Here is my config:</div><div><br></div><div><div>log-dhcp</div><div>dhcp-authoritative</div><div>interface=bond0</div><div>listen-address=10.36.20.19</div><div><br></div><div>dhcp-range=set:int32,10.36.60.5,10.36.60.253,255.255.255.0,60 # LAN DHCP scope</div><div>dhcp-option=tag:int32,option:router</div><div><br></div><div>dhcp-option=tag:int32,121,<a href="http://10.36.0.0/16,10.36.60.1">10.36.0.0/16,10.36.60.1</a></div><div>dhcp-option=tag:int32,option:ntp-server,10.36.25.26</div></div><div><br></div><div><br></div><div><br></div>I am seeing this unexpected behavior with these packets:<div><br></div><div>This is a relayed DHCP Discover from a Cisco Nexus switch:</div><div><br></div><div><div>    103.21.247.66.67 > 10.36.20.19.67: [udp sum ok] BOOTP/DHCP, Request from a8:1e:84:c3:16:8c, length 336, hops 1, xid 0x2085a416, secs 1, Flags [none] (0x0000)</div><div><span style="white-space:pre">     </span>  Gateway-IP 103.21.247.66</div><div><span style="white-space:pre">   </span>  Client-Ethernet-Address a8:1e:84:c3:16:8c</div><div><span style="white-space:pre">  </span>  Vendor-rfc1048 Extensions</div><div><span style="white-space:pre">  </span>    Magic Cookie 0x63825363</div><div><span style="white-space:pre"> </span>    DHCP-Message Option 53, length 1: Discover</div><div><span style="white-space:pre">      </span>    Client-ID Option 61, length 19: hardware-type 255, 46:58:db:60:00:02:00:00:ab:11:3b:1a:a9:7f:6a:55:35:27</div><div><span style="white-space:pre">        </span>    Parameter-Request Option 55, length 9:</div><div><span style="white-space:pre">  </span>      Subnet-Mask, Default-Gateway, Hostname, Domain-Name</div><div><span style="white-space:pre">  </span>      Domain-Name-Server, Static-Route, Classless-Static-Route, NTP</div><div><span style="white-space:pre">        </span>      TZ-Name</div><div><span style="white-space:pre">      </span>    MSZ Option 57, length 2: 576</div><div><span style="white-space:pre">    </span>    Requested-IP Option 50, length 4: 10.36.60.49</div><div><span style="white-space:pre">   </span>    Agent-Information Option 82, length 48:</div><div><span style="white-space:pre"> </span>      Circuit-ID SubOption 1, length 14: ^A^H^@^F^@^@'^Z^@^@^@^@^@^@</div><div><span style="white-space:pre">   </span>      Remote-ID SubOption 2, length 6: ^@:}M-^V+^M</div><div><span style="white-space:pre"> </span>      Unknown SubOption 151, length 10:</div><div><span style="white-space:pre">            </span>0x0000:  0069 6e74 6572 6e61 6c73</div><div><span style="white-space:pre">    </span>      Unknown SubOption 11, length 4:</div><div><span style="white-space:pre">              </span>0x0000:  0a24 3c01</div><div><span style="white-space:pre">   </span>      Unknown SubOption 5, length 4:</div><div><span style="white-space:pre">               </span>0x0000:  0a24 3c00</div></div><div><br></div><div>It contains SubOption 11 for RFC5107 and SubOption 5 for RFC 3527</div><div><br></div><div>Request is being treated properly by dnsmasq and the offer being sent is:</div><div><br></div><div><div>20:50:36.793610 IP (tos 0xc0, ttl 64, id 45936, offset 0, flags [none], proto UDP (17), length 379)</div><div>    162.158.65.83.67 > 103.21.247.66.67: [bad udp cksum 0x43c2 -> 0xaf47!] BOOTP/DHCP, Reply, length 351, hops 1, xid 0x2085a416, secs 1, Flags [none] (0x0000)</div><div><span style="white-space:pre"> </span>  Your-IP 10.36.60.49</div><div><span style="white-space:pre">        </span>  Server-IP 10.36.20.19</div><div><span style="white-space:pre">      </span>  Gateway-IP 103.21.247.66</div><div><span style="white-space:pre">   </span>  Client-Ethernet-Address a8:1e:84:c3:16:8c</div><div><span style="white-space:pre">  </span>  Vendor-rfc1048 Extensions</div><div><span style="white-space:pre">  </span>    Magic Cookie 0x63825363</div><div><span style="white-space:pre"> </span>    DHCP-Message Option 53, length 1: Offer</div><div><span style="white-space:pre"> </span>    Server-ID Option 54, length 4: 10.36.60.1</div><div><span style="white-space:pre">       </span>    Lease-Time Option 51, length 4: 120</div><div><span style="white-space:pre">     </span>    SUBNET Option 118, length 4: 10.36.60.0</div><div><span style="white-space:pre"> </span>    RN Option 58, length 4: 60</div><div><span style="white-space:pre">      </span>    RB Option 59, length 4: 105</div><div><span style="white-space:pre">     </span>    Subnet-Mask Option 1, length 4: 255.255.255.0</div><div><span style="white-space:pre">   </span>    BR Option 28, length 4: 10.36.60.255</div><div><span style="white-space:pre">    </span>    NTP Option 42, length 4: 10.36.25.26</div><div><span style="white-space:pre">    </span>    Classless-Static-Route Option 121, length 7: (<a href="http://10.36.0.0/16:10.36.60.1">10.36.0.0/16:10.36.60.1</a>)</div><div><span style="white-space:pre">       </span>    Agent-Information Option 82, length 48:</div><div><span style="white-space:pre"> </span>      Circuit-ID SubOption 1, length 14: ^A^H^@^F^@^@'^Z^@^@^@^@^@^@</div><div><span style="white-space:pre">   </span>      Remote-ID SubOption 2, length 6: ^@:}M-^V+^M</div><div><span style="white-space:pre"> </span>      Unknown SubOption 151, length 10:</div><div><span style="white-space:pre">            </span>0x0000:  0069 6e74 6572 6e61 6c73</div><div><span style="white-space:pre">    </span>      Unknown SubOption 11, length 4:</div><div><span style="white-space:pre">              </span>0x0000:  0a24 3c01</div><div><span style="white-space:pre">   </span>      Unknown SubOption 5, length 4:</div><div><span style="white-space:pre">               </span>0x0000:  0a24 3c00</div></div><div><br></div><div><br></div><div>According to RFC5107, Server-ID is correctly forced to the relay 10.36.60.1. It's all looking good.</div><div><br></div><div>Problem is on the renewal of the lease:</div><div><br></div><div>Request received is:</div><div><br></div><div><div>22:07:00.710302 IP (tos 0xc0, ttl 251, id 48805, offset 0, flags [none], proto UDP (17), length 370)</div><div>    103.21.247.66.67 > 10.36.20.19.67: [udp sum ok] BOOTP/DHCP, Request from a8:1e:84:c3:16:8c, length 342, hops 1, xid 0xa046c86b, secs 1738, Flags [none] (0x0000)</div><div><span style="white-space:pre">     </span>  Gateway-IP 103.21.247.66</div><div><span style="white-space:pre">   </span>  Client-Ethernet-Address a8:1e:84:c3:16:8c</div><div><span style="white-space:pre">  </span>  Vendor-rfc1048 Extensions</div><div><span style="white-space:pre">  </span>    Magic Cookie 0x63825363</div><div><span style="white-space:pre"> </span>    DHCP-Message Option 53, length 1: Request</div><div><span style="white-space:pre">       </span>    Client-ID Option 61, length 19: hardware-type 255, 46:58:db:60:00:02:00:00:ab:11:3b:1a:a9:7f:6a:55:35:27</div><div><span style="white-space:pre">        </span>    Parameter-Request Option 55, length 9:</div><div><span style="white-space:pre">  </span>      Subnet-Mask, Default-Gateway, Hostname, Domain-Name</div><div><span style="white-space:pre">  </span>      Domain-Name-Server, Static-Route, Classless-Static-Route, NTP</div><div><span style="white-space:pre">        </span>      TZ-Name</div><div><span style="white-space:pre">      </span>    MSZ Option 57, length 2: 576</div><div><span style="white-space:pre">    </span>    Server-ID Option 54, length 4: 10.36.20.19</div><div><span style="white-space:pre">      </span>    Requested-IP Option 50, length 4: 10.36.60.49</div><div><span style="white-space:pre">   </span>    Agent-Information Option 82, length 48:</div><div><span style="white-space:pre"> </span>      Circuit-ID SubOption 1, length 14: ^A^H^@^F^@^@'^Z^@^@^@^@^@^@</div><div><span style="white-space:pre">   </span>      Remote-ID SubOption 2, length 6: ^@:}M-^V+^M</div><div><span style="white-space:pre"> </span>      Unknown SubOption 151, length 10:</div><div><span style="white-space:pre">            </span>0x0000:  0069 6e74 6572 6e61 6c73</div><div><span style="white-space:pre">    </span>      Unknown SubOption 11, length 4:</div><div><span style="white-space:pre">              </span>0x0000:  0a24 3c01</div><div><span style="white-space:pre">   </span>      Unknown SubOption 5, length 4:</div><div><span style="white-space:pre">               </span>0x0000:  0a24 3c00</div></div><div><br></div><div>This request never gets acknowledged by dnsmasq.</div><div><br></div><div>I have identified the line that silently drops the request:</div><div><br></div><div><a href="https://github.com/imp/dnsmasq/blob/master/src/rfc2131.c#L1093">https://github.com/imp/dnsmasq/blob/master/src/rfc2131.c#L1093</a><br></div><div><br></div><div>If I bypass this check, the request is correctly acknowledged and replied to. </div><div><br></div><div>I don't see anything wrong with the Request, and I'm not sure what the check is supposed to mean.</div><div><br></div><div>Can anyone confirm this is indeed a bug ?</div></div>