Discussion:
[Dnsmasq-discuss] dnsmasq does not respect BOOTP's broadcast flag
黎伟强
2016-04-01 02:38:30 UTC
Permalink
Dear all, I got a router using dnsmasq-2.66 for DHCP services, and I encountered a bug that the dnsmasq server does not respond to my PC's DHCPREQUEST( normally it should respond with a DHCPNAK? ), so it takes an obvious long time to got a new IP for my PC. So, is this really a bug or it is just something wrong with my PC(Works well with other DHCP server)? At my first thought, I think it should be a bug that has been solved, so I reviewed the latest(ver.2.75) dnsmasq source code, however, neither did it care about this flag. I also attached a patch for this.
Albert ARIBAUD
2016-04-01 05:24:44 UTC
Permalink
Hello,

Le Fri, 1 Apr 2016 02:38:30 +0000
黎伟强 <***@hotmail.com> a écrit:

> Dear all, I got a router using dnsmasq-2.66 for DHCP services,
> and I encountered a bug that the dnsmasq server does not respond to
> my PC's DHCPREQUEST( normally it should respond with a DHCPNAK? ), so
> it takes an obvious long time to got a new IP for my
> PC.
>
> So, is this really a bug or it is just
> something wrong with my PC(Works well with other DHCP server)? At my
> first thought, I think it should be a bug that has been solved, so I
> reviewed the latest(ver.2.75) dnsmasq source code, however, neither
> did it care about this flag.
>
> I also attached a patch for this.

Are you sure that this is BOOTP related?

As long as dnsmasq is configured to *not* be authoritative, it will
*not* respond with NAKs to requests (as these NAKs might interfere with
another, authoritative, server's positive answers).

Existing option -K (or --dhcp-authoritative in long form) will tell
dnsmasq that it is indeed the only DHCP server around and therefore
authoritative, and as such, it will then emit NAKs for bad requests
(see 'man dnsmasq' for details).

Can you try without your patch and with -K option?

Amicalement,
--
Albert.
黎伟强
2016-04-01 05:32:44 UTC
Permalink
Yeah, I've read the manual and that option is checked. It just won't work.

Sent from my iPhone

> 在 2016年4月1日,13:24,Albert ARIBAUD <***@free.fr> 写道:
>
> Hello,
>
> Le Fri, 1 Apr 2016 02:38:30 +0000
> 黎伟强 <***@hotmail.com> a écrit:
>
>> Dear all, I got a router using dnsmasq-2.66 for DHCP services,
>> and I encountered a bug that the dnsmasq server does not respond to
>> my PC's DHCPREQUEST( normally it should respond with a DHCPNAK? ), so
>> it takes an obvious long time to got a new IP for my
>> PC.
>>
>> So, is this really a bug or it is just
>> something wrong with my PC(Works well with other DHCP server)? At my
>> first thought, I think it should be a bug that has been solved, so I
>> reviewed the latest(ver.2.75) dnsmasq source code, however, neither
>> did it care about this flag.
>>
>> I also attached a patch for this.
>
> Are you sure that this is BOOTP related?
>
> As long as dnsmasq is configured to *not* be authoritative, it will
> *not* respond with NAKs to requests (as these NAKs might interfere with
> another, authoritative, server's positive answers).
>
> Existing option -K (or --dhcp-authoritative in long form) will tell
> dnsmasq that it is indeed the only DHCP server around and therefore
> authoritative, and as such, it will then emit NAKs for bad requests
> (see 'man dnsmasq' for details).
>
> Can you try without your patch and with -K option?
>
> Amicalement,
> --
> Albert.
黎伟强
2016-04-01 06:05:08 UTC
Permalink
As the source code indicates, my patch will work only when the authoritative option is checked.


> From: ***@hotmail.com
> Subject: Re: [Dnsmasq-discuss] dnsmasq does not respect BOOTP's broadcast flag
> Date: Fri, 1 Apr 2016 13:32:44 +0800
> To: ***@free.fr
> CC: dnsmasq-***@lists.thekelleys.org.uk
>
> Yeah, I've read the manual and that option is checked. It just won't work.
>
> Sent from my iPhone
>
> > ÔÚ 2016Äê4ÔÂ1ÈÕ£¬13:24£¬Albert ARIBAUD <***@free.fr> ÐŽµÀ£º
> >
> > Hello,
> >
> > Le Fri, 1 Apr 2016 02:38:30 +0000
> > Àèΰǿ <***@hotmail.com> a šŠcrit:
> >
> >> Dear all, I got a router using dnsmasq-2.66 for DHCP services,
> >> and I encountered a bug that the dnsmasq server does not respond to
> >> my PC's DHCPREQUEST( normally it should respond with a DHCPNAK? ), so
> >> it takes an obvious long time to got a new IP for my
> >> PC.
> >>
> >> So, is this really a bug or it is just
> >> something wrong with my PC(Works well with other DHCP server)? At my
> >> first thought, I think it should be a bug that has been solved, so I
> >> reviewed the latest(ver.2.75) dnsmasq source code, however, neither
> >> did it care about this flag.
> >>
> >> I also attached a patch for this.
> >
> > Are you sure that this is BOOTP related?
> >
> > As long as dnsmasq is configured to *not* be authoritative, it will
> > *not* respond with NAKs to requests (as these NAKs might interfere with
> > another, authoritative, server's positive answers).
> >
> > Existing option -K (or --dhcp-authoritative in long form) will tell
> > dnsmasq that it is indeed the only DHCP server around and therefore
> > authoritative, and as such, it will then emit NAKs for bad requests
> > (see 'man dnsmasq' for details).
> >
> > Can you try without your patch and with -K option?
> >
> > Amicalement,
> > --
> > Albert.
五月
2016-04-01 05:21:35 UTC
Permalink
Greetings.

I don't quite understand the broadcast flag, however I did encounter the "taking a very long time to obtain an IP" problem.

I'm on Windows 10. Router has dnsmasq 2.75.

During Windows booting process, its firewall would deny any unicast packet from outside its own subnet, that including DHCP. Windows would try to request DHCP, then deny the reply, a few times.

Solution is asking Windows to request a DHCP reply via broadcast: http://sysadministrivia.blogspot.jp/2011/04/dhcp-broadcast-flag-problem-with-dhcp.html

Wish this help.


ÎåÔÂ
2016.4

From: ***@hotmail.com
To: dnsmasq-***@lists.thekelleys.org.uk
Date: Fri, 1 Apr 2016 02:38:30 +0000
Subject: [Dnsmasq-discuss] dnsmasq does not respect BOOTP's broadcast flag




Dear all, I got a router using dnsmasq-2.66 for DHCP services, and I encountered a bug that the dnsmasq server does not respond to my PC's DHCPREQUEST( normally it should respond with a DHCPNAK? ), so it takes an obvious long time to got a new IP for my PC. So, is this really a bug or it is just something wrong with my PC(Works well with other DHCP server)? At my first thought, I think it should be a bug that has been solved, so I reviewed the latest(ver.2.75) dnsmasq source code, however, neither did it care about this flag. I also attached a patch for this.
黎伟强
2016-04-01 07:07:17 UTC
Permalink
Thanks for the reply.I've read the post, but unfortunately, not the same thing. The post's key point is that the DHCP server offer the DHCP offer with unicast is set(since the client requested), but the firewall of Win7 just reject it. My problem is that dnsmasq just silently ignored my request.

From: ***@live.cn
To: dnsmasq-***@lists.thekelleys.org.uk
Date: Fri, 1 Apr 2016 13:21:35 +0800
Subject: Re: [Dnsmasq-discuss] dnsmasq does not respect BOOTP's broadcast flag




Greetings.

I don't quite understand the broadcast flag, however I did encounter the "taking a very long time to obtain an IP" problem.

I'm on Windows 10. Router has dnsmasq 2.75.

During Windows booting process, its firewall would deny any unicast packet from outside its own subnet, that including DHCP. Windows would try to request DHCP, then deny the reply, a few times.

Solution is asking Windows to request a DHCP reply via broadcast: http://sysadministrivia.blogspot.jp/2011/04/dhcp-broadcast-flag-problem-with-dhcp.html

Wish this help.


ÎåÔÂ
2016.4

From: ***@hotmail.com
To: dnsmasq-***@lists.thekelleys.org.uk
Date: Fri, 1 Apr 2016 02:38:30 +0000
Subject: [Dnsmasq-discuss] dnsmasq does not respect BOOTP's broadcast flag




Dear all, I got a router using dnsmasq-2.66 for DHCP services, and I encountered a bug that the dnsmasq server does not respond to my PC's DHCPREQUEST( normally it should respond with a DHCPNAK? ), so it takes an obvious long time to got a new IP for my PC. So, is this really a bug or it is just something wrong with my PC(Works well with other DHCP server)? At my first thought, I think it should be a bug that has been solved, so I reviewed the latest(ver.2.75) dnsmasq source code, however, neither did it care about this flag. I also attached a patch for this.
Simon Kelley
2016-04-04 16:15:32 UTC
Permalink
Please could you post the actual packet capture for that capture,
instead of a screenshot? I need to look at other parts of the packet
which are not shown to understand what's going on.

(Save as... from the wireshark File menu should do the trick.)


Cheers,

Simon.

On 01/04/16 03:38, 黎伟强 wrote:
> Dear all, I got a router using dnsmasq-2.66 for DHCP
> services, and I encountered a bug that the dnsmasq server does not
> respond to my PC's DHCPREQUEST( normally it should respond with a
> DHCPNAK? ), so it takes an obvious long time to got a new IP for my
> PC. So, is this really a bug or it is just something wrong with my
> PC(Works well with other DHCP server)? At my first thought, I
> think it should be a bug that has been solved, so I reviewed the
> latest(ver.2.75) dnsmasq source code, however, neither did it care
> about this flag. I also attached a patch for this.
>
>
>
>
> _______________________________________________ Dnsmasq-discuss
> mailing list Dnsmasq-***@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
黎伟强
2016-04-05 10:18:08 UTC
Permalink
Here you are.

> To: dnsmasq-***@lists.thekelleys.org.uk
> From: ***@thekelleys.org.uk
> Date: Mon, 4 Apr 2016 17:15:32 +0100
> Subject: Re: [Dnsmasq-discuss] dnsmasq does not respect BOOTP's broadcast flag
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
>
> Please could you post the actual packet capture for that capture,
> instead of a screenshot? I need to look at other parts of the packet
> which are not shown to understand what's going on.
>
> (Save as... from the wireshark File menu should do the trick.)
>
>
> Cheers,
>
> Simon.
>
> On 01/04/16 03:38, Àèΰǿ wrote:
> > Dear all, I got a router using dnsmasq-2.66 for DHCP
> > services, and I encountered a bug that the dnsmasq server does not
> > respond to my PC's DHCPREQUEST( normally it should respond with a
> > DHCPNAK? ), so it takes an obvious long time to got a new IP for my
> > PC. So, is this really a bug or it is just something wrong with my
> > PC(Works well with other DHCP server)? At my first thought, I
> > think it should be a bug that has been solved, so I reviewed the
> > latest(ver.2.75) dnsmasq source code, however, neither did it care
> > about this flag. I also attached a patch for this.
> >
> >
> >
> >
> > _______________________________________________ Dnsmasq-discuss
> > mailing list Dnsmasq-***@lists.thekelleys.org.uk
> > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.22 (GNU/Linux)
>
> iQIcBAEBCAAGBQJXApMkAAoJEBXN2mrhkTWiD4EP/31oX7HXVtMhDCt18Fo6klbu
> wrD4GysARnuj3NdFSQv/aEkoJ/ZZYH8g/ChPZSLNRhXd+0EuzhNGC14LnfgM7bUg
> tbbhq3iT99uATuiH20UyXUVrsKwI89xa7Mr4S0VRDt2IZlXtQwEgRnaMfQcgr407
> mgU4Uv6Jtpy6SBurYzRt0C897H0YFYwLryqWE5M6hJuhctlC0CcQPkb7vjBuoteM
> m0idx+oBYLzmKblbZyuxZa5JsN3T4Duk46+UTTppMwljjWvwORuCRfkq0gAFlKB+
> n9OwzKcqFfRix3zw7OP06c1ZVhUgw0O4pbX5/tzjU9f2GJ+rIcAk2xNHUBeDOHqf
> H/TGcGReGt2vybZ6+GpM4IoKUGWhqC3AzeMzYWGraYupfbkaebHqe+tiWNknIi0s
> Z+GYpUmAkRE4w+K062ldDqqueG47SIdBLKXTv0vcGmnXDFvafJcQuvr6VQrAjCIt
> fC86YR77TRgvfuG8E75lpVjJGNahvBhZid8z5S8oi7HdZb3OPVtXbbOPRJ+96kTb
> D4tyRTvupjWiM/29lxqOHFPtuM5MKLVGXlVql6jdMyZr51qdH/rxrHlGCuXLMU6T
> V1offYG8epjrI3aLUv0eOV4xf+UJ11RSBIofQQORM8U+pfVlSjJh5FUHipJAjkH6
> FoxjOxt6R1dEXbulVq5Y
> =1gD8
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-***@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Simon Kelley
2016-04-25 17:10:15 UTC
Permalink
What software is your PC running? The DHCP client is broken. Look at

https://www.ietf.org/rfc/rfc2131.txt paragraph 4.3.6

The DHCP requests your PC is sending have no server-ip option, no,
requested-ip option and the ciaddr field is zero. That combination
doesn't fit any of the columns in the table, so the request is invalid.

If the PC is just booting (or returning from sleep) then it should
probably be in INIT-REBOOT state, and should include a requested-ip
option. If it did, then dnsmasq would reply.



Cheers,

Simon.


On 05/04/16 11:18, Àèΰǿ wrote:
> Here you are.
>
>> To: dnsmasq-***@lists.thekelleys.org.uk
>> From: ***@thekelleys.org.uk
>> Date: Mon, 4 Apr 2016 17:15:32 +0100
>> Subject: Re: [Dnsmasq-discuss] dnsmasq does not respect BOOTP's broadcast flag
>>
>
> Please could you post the actual packet capture for that capture,
> instead of a screenshot? I need to look at other parts of the packet
> which are not shown to understand what's going on.
>
> (Save as... from the wireshark File menu should do the trick.)
>
>
> Cheers,
>
> Simon.
>
> On 01/04/16 03:38, Àèΰǿ wrote:
>>>> Dear all, I got a router using dnsmasq-2.66 for DHCP
>>>> services, and I encountered a bug that the dnsmasq server does not
>>>> respond to my PC's DHCPREQUEST( normally it should respond with a
>>>> DHCPNAK? ), so it takes an obvious long time to got a new IP for my
>>>> PC. So, is this really a bug or it is just something wrong with my
>>>> PC(Works well with other DHCP server)? At my first thought, I
>>>> think it should be a bug that has been solved, so I reviewed the
>>>> latest(ver.2.75) dnsmasq source code, however, neither did it care
>>>> about this flag. I also attached a patch for this.
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________ Dnsmasq-discuss
>>>> mailing list Dnsmasq-***@lists.thekelleys.org.uk
>>>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>>>>
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-***@lists.thekelleys.org.uk
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
>
Loading...