<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 14 (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:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@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=blue vlink=purple><div class=WordSection1><p class=MsoNormal>I recently was trying to transition from OpenWRT to LEDE and ran into a problem with DHCP relay not working correctly after the transition.  I have taken debug about as far as I can and am looking for some help going forward.  <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Some details on network and configuration:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Network A (VLAN82) 192.168.42.0/24<o:p></o:p></p><p class=MsoNormal>                Host: DHCP Server 192.168.42.4 <o:p></o:p></p><p class=MsoNormal>                Host: Relay 192.168.42.41 on interface (eth0.82)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Network B (VLAN85) 192.168.85.0/24<o:p></o:p></p><p class=MsoNormal>                Host: DHCP Client MAC:  (00:0c:29:ed:03:a5)<o:p></o:p></p><p class=MsoNormal>                Host: Relay 192.168.85.2 on interface (eth0.85)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>dnsmasq.conf on the Relay host:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>dhcp-authoritative<o:p></o:p></p><p class=MsoNormal>domain-needed<o:p></o:p></p><p class=MsoNormal>localise-queries<o:p></o:p></p><p class=MsoNormal>read-ethers<o:p></o:p></p><p class=MsoNormal>bogus-priv<o:p></o:p></p><p class=MsoNormal>expand-hosts<o:p></o:p></p><p class=MsoNormal>local-service<o:p></o:p></p><p class=MsoNormal>domain=lan<o:p></o:p></p><p class=MsoNormal>server=/lan/<o:p></o:p></p><p class=MsoNormal>dhcp-leasefile=/tmp/dhcp.leases<o:p></o:p></p><p class=MsoNormal>resolv-file=/tmp/resolv.conf.auto<o:p></o:p></p><p class=MsoNormal>stop-dns-rebind<o:p></o:p></p><p class=MsoNormal>rebind-localhost-ok<o:p></o:p></p><p class=MsoNormal>dhcp-broadcast=tag:needs-broadcast<o:p></o:p></p><p class=MsoNormal>addn-hosts=/tmp/hosts<o:p></o:p></p><p class=MsoNormal>conf-dir=/tmp/dnsmasq.d<o:p></o:p></p><p class=MsoNormal>user=dnsmasq<o:p></o:p></p><p class=MsoNormal>group=dnsmasq<o:p></o:p></p><p class=MsoNormal>dhcp-relay=192.168.85.2,192.168.42.4<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The platform is a set of virtual machines running on x86 hardware.  <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Software versions working case:<o:p></o:p></p><p class=MsoNormal>Kernel:  Linux Openwrt 3.18.23 #1 SMP Sun Jan 31 15:32:38 CET 2016 x86_64 GNU/Linux<o:p></o:p></p><p class=MsoNormal>DNSMasq:  Dnsmasq version 2.73  Copyright (c) 2000-2015 Simon Kelley<o:p></o:p></p><p class=MsoNormal>Compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC loop-detect inotify<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Software versions NOT working case:<o:p></o:p></p><p class=MsoNormal>Kernel:  Linux LEDE 4.4.71 #0 SMP Wed Jun 7 19:24:41 2017 x86_64 GNU/Linux<o:p></o:p></p><p class=MsoNormal>Dnsmasq version 2.77  Copyright (c) 2000-2016 Simon Kelley<o:p></o:p></p><p class=MsoNormal>Compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>In the working case the normal 4 packet DHCP handshake occurs as expected and the relay passes the packets between the DHCP server and the client.  <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>In the failing case the client request packet gets from the client to the relay and then on to the dhcp server via the relay.  The response from the dhcp server makes it back to the relay, but then the corresponding packet from the relay to the client never gets sent.  Though I see the packet come back from the server it is not clear that DNSMasq sees the packet.  I can attach TCP dumps as needed.   Any help in further debug steps to determine if dnsmasq is not seeing the response from the DHCP server or is not sending the packet and why would be very helpful.  <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I also came across this bug that looks similar but I am not sure has been reported upstream:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><a href="https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1686192">https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1686192</a><o:p></o:p></p><p class=MsoNormal><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><o:p> </o:p></p><p class=MsoNormal>Ray Ramadorai<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>