Your message dated Wed, 27 Feb 2008 00:26:58 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#451871: fixed in dnsmasq 2.41-1
has caused the Debian Bug report #451871,
regarding dnsmasq: Possible conflict between lease times given in DHCPOFFER and 
DHCPACK messages
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
451871: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=451871
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: dnsmasq
Version: 2.40-1
Severity: minor

I've been trying to get the DHCP client of a Sony Ericsson K610i
mobile phone to work with dnsmasq. The first attempt to obtain a lease
succeeds, but subsequent attempts fail until the lease has expired or
the lease is explicitly purged from the lease file of dnsmasq and
dnsmasq restarted. My dnsmasq.conf file contains only the following
line:

dhcp-range=10.0.0.100,10.0.0.200,20m

I've attached two files, containing the packets from the conversation
between the client and server as captured by Wireshark, both in the
case of success (first attempt) and failure (subsequent attempt). The
most obvious difference between these dumps AFAICT, is that the lease
times differs in the DHCPOFFER and DHCPACK messages sent by dnsmasq in
the second dump, while this is not the case in the first dump.
(In fact, the lease time given in the DHCPACK message (20 min, same as
in config file) is longer than the lease time given in the DHCPOFFER
(seems to be the time remaining of a previous lease), which seems
somewhat peculiar in my opinion.)

And this actually seems to be the reason why the client wouldn't
accept the lease offered by dnsmasq in subsequent attempts; by
modifying the call to the function calc_time which calculates the
lease time for DHCPOFFER messages to be identical to the call to
calc_time for DHCPACK messages, the same lease time is given in
both messages, and the client also accepts the lease in subsequent
attempts:

diff -Naur a/src/rfc2131.c b/src/rfc2131.c
--- a/src/rfc2131.c     2007-08-29 19:12:51.000000000 +0000
+++ b/src/rfc2131.c     2007-11-15 01:37:01.000000000 +0000
@@ -733,7 +733,7 @@
          netid = &context->netid;
        }
        
-      time = calc_time(context, config, lease, option_find(mess, sz, 
OPTION_LEASE_TIME, 4), now);
+      time = calc_time(context, config, NULL, option_find(mess, sz, 
OPTION_LEASE_TIME, 4), now);
       clear_packet(mess, end);
       option_put(mess, end, OPTION_MESSAGE_TYPE, 1, DHCPOFFER);
       option_put(mess, end, OPTION_SERVER_IDENTIFIER, INADDRSZ, 
ntohl(context->local.s_addr));

(I've also tried various hard-coded lease times for the two message
types, for example with the lease time in DHCPACKs being shorter than
in DHCPOFFERs, but the client does not seem to accept the lease unless
the lease times given in both message types are equal.)

I'm not particularly familiar with DHCP, and this could very well be
considered a bug in the client, but I've had a quick look at RFC 2131
to see if that has anything to say about the subject. However, the
closest I could get was the following paragraph from section 4.3.2:

   Any configuration parameters in the DHCPACK message SHOULD NOT
   conflict with those in the earlier DHCPOFFER message to which the
   client is responding.  The client SHOULD use the parameters in the
   DHCPACK message for configuration.

I suppose that what is meant by conflict, and whether there is a
conflict in this case, is up to debate, and the paragraph isn't
formulated as a strict requirement either.

For the record, however, it seems that the ISC DHCP server, at least
as far as I can tell, always provides the same lease time in DHCPOFFER
and DHCPACK messages. The client in question also has no problem with
obtaining a lease from this server.


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages dnsmasq depends on:
ii  adduser                       3.105      add and remove users and groups
ii  libc6                         2.6.1-6    GNU C Library: Shared libraries
ii  libdbus-1-3                   1.1.1-3    simple interprocess messaging syst
ii  netbase                       4.30       Basic TCP/IP networking system

dnsmasq recommends no packages.

-- no debconf information

Attachment: dhcp-success.pcap
Description: Binary data

Attachment: dhcp-failure.pcap
Description: Binary data


--- End Message ---
--- Begin Message ---
Source: dnsmasq
Source-Version: 2.41-1

We believe that the bug you reported is fixed in the latest version of
dnsmasq, which is due to be installed in the Debian FTP archive:

dnsmasq-base_2.41-1_i386.deb
  to pool/main/d/dnsmasq/dnsmasq-base_2.41-1_i386.deb
dnsmasq_2.41-1.diff.gz
  to pool/main/d/dnsmasq/dnsmasq_2.41-1.diff.gz
dnsmasq_2.41-1.dsc
  to pool/main/d/dnsmasq/dnsmasq_2.41-1.dsc
dnsmasq_2.41-1_all.deb
  to pool/main/d/dnsmasq/dnsmasq_2.41-1_all.deb
dnsmasq_2.41.orig.tar.gz
  to pool/main/d/dnsmasq/dnsmasq_2.41.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Simon Kelley <[EMAIL PROTECTED]> (supplier of updated dnsmasq package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu, 31 Jan 2008 20:25:28 +0000
Source: dnsmasq
Binary: dnsmasq dnsmasq-base
Architecture: source all i386
Version: 2.41-1
Distribution: unstable
Urgency: low
Maintainer: Simon Kelley <[EMAIL PROTECTED]>
Changed-By: Simon Kelley <[EMAIL PROTECTED]>
Description: 
 dnsmasq    - A small caching DNS proxy and DHCP/TFTP server
 dnsmasq-base - A small caching DNS proxy and DHCP/TFTP server
Closes: 448038 451871 463407 464357 464512 464691 465062
Changes: 
 dnsmasq (2.41-1) unstable; urgency=low
 .
    * New upstream.
    * Fix typo. (closes: #448038)
    * Fix DHCP problem interoperating with Sony Ericsson K610i (closes: #451871)
    * Split binary packages into dnsmasq and dnsmasq-base (closes: #463407)
    * Add warnings about bad effects of --filterwin2k to default config
      file. (closes: #464357)
    * Don't declare Provides: $named in LSB header. (closes: #464512)
    * Remove conflict with pdnsd. (closes: #464691)
    * Add ability to disable dnsmasq in /etc/default/dnsmasq. (closes: #465062)
Files: 
 a2fc89e7bbfdefcae913aaac8e15868b 596 net optional dnsmasq_2.41-1.dsc
 8d0acd6656299a800c4d1be5a1193e39 357997 net optional dnsmasq_2.41.orig.tar.gz
 9f675eb668870304301728bfad764863 13068 net optional dnsmasq_2.41-1.diff.gz
 8c6853668f8acdab7b610ee038270d24 11860 net optional dnsmasq_2.41-1_all.deb
 58ca35766e3910fad2ab1a619595cc0d 233690 net optional 
dnsmasq-base_2.41-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHxHZ9KeFPmTkbOSgRAs6SAKClv1H/4ASTwQ/DjGfyNniZ6OvvWgCgl/mp
JZydFpYoe76oxtUI+6HHUd8=
=sqjk
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to