[Dnsmasq-discuss] [PATCH] dnsmasq-missing-nak.patch

Dan Shechter DanS at GoNetworks.com
Wed Aug 17 11:19:44 BST 2005


Well, The timeout's I was referring to are timeout of about 30-40 seconds...
The "new" packet flow after the fix looks like this (Note the packet marked as: "NEW PACKET AFTER THE FIX"):

Basically, without this NAK packet, the client would send about another 3-4 DHCP requests, for about 30 seconds, and only AFTER that the DHCP Discover packet.

After the fix, the DHCP discover packet is sent by the Windows XP SP2 client
After about a second as you can see.

	Shechter.
-------------------------- BEGIN PACKET DUMP -------------------------------
No.     Time        Source                Destination           Protocol Info
      1 0.000000    192.168.30.167        255.255.255.255       DHCP     DHCP Request  - Transaction ID 0xcbe6fd34
---------------------- NEW PACKET AFTER THE FIX ----------------------------
      3 0.004196    10.100.4.1            255.255.255.255       DHCP     DHCP NAK      - Transaction ID 0xcbe6fd34
---------------------- NEW PACKET AFTER THE FIX ----------------------------      8 1.060573    0.0.0.0               255.255.255.255       DHCP     DHCP Discover - Transaction ID 0x18029de9
     10 1.066425    10.100.4.1            10.100.4.91           DHCP     DHCP Offer    - Transaction ID 0x18029de9
     11 1.066848    0.0.0.0               255.255.255.255       DHCP     DHCP Request  - Transaction ID 0x18029de9
     12 1.070199    10.100.4.1            10.100.4.91           DHCP     DHCP ACK      - Transaction ID 0x18029de9
     23 3.931349    10.100.4.1            10.100.4.177          DHCP     DHCP Offer    - Transaction ID 0x18029de
--------------------------- END PACKET DUMP --------------------------------

> -----Original Message-----
> From: Gyorgy Farkas [mailto:farkas.mailbox at freemail.hu]
> Sent: Monday, August 15, 2005 17:24
> To: dnsmasq-discuss at lists.thekelleys.org.uk
> Cc: Dan Shechter; Max Kovalenko
> Subject: Re: [Dnsmasq-discuss] [PATCH] dnsmasq-missing-nak.patch
> 
> Dan Shechter <DanS at GoNetworks.com> wrote:
> 
> > Hi,
> > Following my "bug report", I wanted to Clarify and submit
> a patch:
> > I'm sorry if someone got the wrong impression, I wasn't
> implying that
> > the client
> > Doesn't EVER get an address from dnsmasq... The problem is
> that the
> > retries are
> > Causing a Windows XP SP2 client to wait for 30-40 seconds
> before doing a
> > DHCPDISCOVER
> > Instead of doing it immediately had it received a DHCPNAK.
> >
> > The attached patch fixes this bug assuming the -K /
> dhcp_authorative
> > flags were passed to the daemon.
> > Feel free to apply it to dnsmasq-2.22.
> >
> > I'm Simon will have a more correct way of doing this, but
> this works for
> > me now and I was a little stressed in time :(
> >
> > ----------
> > Dan Shechter <dans *at* gonetworks.com>
> >
> >
> 
> Does it mean - the whole trouble is already solved by the
> suggested patch ?
> 
> 
> I'm really interested in such problems but some exact info
> might help to interpret/reproduce(/solve?) it much better.
> 
> The next is a highly simplified DHCP traffic capture example
> created by
> tcpdump -n -i eth1 -s 0 -w /tmp/wxp port 67 or port 68
> dnsmasq-2.20 is on a Linux router (floppyfw-2.99.4 AMD K6-2/450)
> the client was a (fully up to date;) Windows XP Home notebook.
> 
> 
> 13:58:24.671288 0.0.0.0.68 > 255.255.255.255.67:
>   xid:0xe2537100 DHCP:REQUEST CID:01:00:e0:00:9a:40:dd
>    RQ:192.168.1.150 HN:"wxph"
> 13:58:24.679444 10.42.42.1.67 > 255.255.255.255.68:
>   xid:0xe2537100 ether 0:e0:0:9a:40:dd
>    DHCP:NACK MSG:"wrong network"
> 
> 13:58:25.831208 0.0.0.0.68 > 255.255.255.255.67:
>   xid:0xf7052b4c DHCP:DISCOVER CID:01:00:e0:00:9a:40:dd
>    HN:"wxph"
> 13:58:28.081029 10.42.42.1.67 > 10.42.42.171.68:
>   xid:0xf7052b4c Y:10.42.42.171 S:10.42.42.1 DHCP:OFFER
>    SID:10.42.42.1 SM:255.255.255.0 DG:10.42.42.1
>     NS:10.42.42.1 DN:"local...
> 
> 13:58:35.082678 0.0.0.0.68 > 255.255.255.255.67:
>   xid:0xf7052b4c DHCP:REQUEST CID:01:00:e0:00:9a:40:dd
>    RQ:10.42.42.171 SID:10.42.42.1 HN:"wxph"
> 13:58:35.090596 10.42.42.1.67 > 10.42.42.171.68:
>   xid:0xf7052b4c Y:10.42.42.171 S:10.42.42.1 DHCP:ACK
>    SID:10.42.42.1 LT:3600 RN:1800 RB:3150
>    SM:255.255.255.0 DG:10.42.42.1 NS:10.42.42.1 DN:"local
> ... and so on
> 
> 
> As you can see - the longest "time-lag" of "my" dnsmasq was
> about three seconds.
> 
> 
> Cheers,
> George.
> 
> 
> 
> _______________________________________________________________________
> [freemail] extra 1GB-os postafiókkal, Önnek már van? http://freemail.hu
> 




More information about the Dnsmasq-discuss mailing list