From gallatin@cs.duke.edu  Wed Jul 21 01:00:12 2004
Return-Path: <gallatin@cs.duke.edu>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1B8B616A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 21 Jul 2004 01:00:12 +0000 (GMT)
Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 9EC2243D3F
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 21 Jul 2004 01:00:11 +0000 (GMT)
	(envelope-from gallatin@cs.duke.edu)
Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30])
	by duke.cs.duke.edu (8.12.10/8.12.10) with ESMTP id i6L10AR0001276
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 20 Jul 2004 21:00:10 -0400 (EDT)
Received: (from gallatin@localhost)
	by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id i6L105Tm045340;
	Tue, 20 Jul 2004 21:00:05 -0400 (EDT)
	(envelope-from gallatin)
Message-Id: <200407210100.i6L105Tm045340@grasshopper.cs.duke.edu>
Date: Tue, 20 Jul 2004 21:00:05 -0400 (EDT)
From: Andrew Gallatin <gallatin@cs.duke.edu>
Reply-To: Andrew Gallatin <gallatin@cs.duke.edu>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: dhclient sends bogus data to dhcpd and fails to get a lease
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         69361
>Category:       bin
>Synopsis:       dhclient sends bogus data to dhcpd and fails to get a lease
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mbr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 21 01:00:42 GMT 2004
>Closed-Date:    Mon Aug 16 21:33:08 GMT 2004
>Last-Modified:  Mon Aug 16 21:33:08 GMT 2004
>Originator:     Andrew Gallatin
>Release:        FreeBSD 5.2-CURRENT amd64 and powerpc at least
>Organization:
>Environment:
FreeBSD thor 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Sat Jul 17 07:33:17 EDT
2004     root@:/usr/src/sys/amd64/compile/THORL  amd64

FreeBSD g4 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Sun Jul 11 17:05:07 GMT 2004
  gallatin@g4:/home/gallatin/current/sys/powerpc/compile/G4  powerpc
>Description:
dhclient occasionally fails to obtain a lease.  

>How-To-Repeat:
Watch for random hangs at boot.  It seems to be totally random,
but perhaps it has something to do with the current time.  Both
machines (ppc and amd64) failed to obtain a lease within an
hour of each other.

Here is the lease for the amd64:
less /var/db/dhclient.leases
lease {
  interface "sk0";
  fixed-address 172.31.193.11;
  option subnet-mask 255.255.255.0;
  option routers 172.31.193.254;
  option dhcp-lease-time 86400;
  option dhcp-message-type 5;
  option domain-name-servers 152.3.140.1,172.31.0.1;
  option dhcp-server-identifier 172.31.193.254;
  option broadcast-address 172.31.193.255;
  renew 2 2004/7/20 11:22:49;
  rebind 2 2004/7/20 20:27:21;
  expire 2 2004/7/20 23:27:21;
}

And here is the lease for the powerpc:



lease {
  interface "gem0";
  fixed-address 172.31.193.6;
  option subnet-mask 255.255.255.0;
  option routers 172.31.193.254;
  option dhcp-lease-time 86400;
  option dhcp-message-type 5;
  option domain-name-servers 172.31.0.1;
  option dhcp-server-identifier 172.31.193.254;
  option broadcast-address 172.31.193.255;
  renew 2 2004/7/20 07:36:02;
  rebind 2 2004/7/20 16:46:43;
  expire 2 2004/7/20 19:46:43;
}

I powered off my snapgear VPN/router and ran
isc-dhcp3-3.0.1.r12 on an x86 when the problem happened for the second time
(ie, on the powerpc).  The server gave these messages when run in
forground mode:
stening on BPF/fxp0/00:07:e9:a8:36:f2/172.31.193.0/24
Sending on   BPF/fxp0/00:07:e9:a8:36:f2/172.31.193.0/24
Sending on   Socket/fallback/fallback-net
DHCPREQUEST for 0.0.0.0 from 00:03:93:56:99:42 via fxp0: unknown lease 0.0.0.0.
DHCPREQUEST for 0.0.0.0 from 00:03:93:56:99:42 via fxp0: unknown lease 0.0.0.0.

 
>Fix:
Unknown.

Removing  /var/db/dhclient.leases works around the problem.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mbr 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Wed Jul 21 01:13:41 GMT 2004 
Responsible-Changed-Why:  
Over to Martin, whose hands are in dhclient. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=69361 
State-Changed-From-To: open->feedback 
State-Changed-By: mbr 
State-Changed-When: Wed Jul 21 08:40:15 GMT 2004 
State-Changed-Why:  
Do you use a recent CURRENT ? I just upgraded the dhclient 
and DES did add also add some 64bit platform fixes. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69361 

From: Ulrich Spoerlein <q@uni.de>
To: freebsd-gnats-submit@FreeBSD.org, gallatin@cs.duke.edu
Cc:  
Subject: "Re: bin/69361: dhclient sends bogus data to dhcpd and fails to get a lease"
Date: Tue, 10 Aug 2004 19:13:53 +0200

 I have to say: me too
 
 This is happening on an up-to-date CURRENT Laptop with a bfe(4) NIC. It
 really sucks...
 
 Ulrich Spoerlein
 -- 
 PGP Key ID: F0DB9F44				Get it while it's hot!
 PGP Fingerprint: F1CE D062 0CA9 ADE3 349B  2FE8 980A C6B5 F0DB 9F44
 "They that can give up essential liberty to obtain a little temporary
 safety deserve neither liberty nor safety."	-- Benjamin Franklin

From: Andrew Gallatin <gallatin@cs.duke.edu>
To: Ulrich Spoerlein <q@uni.de>
Cc: freebsd-gnats-submit@FreeBSD.org, mb@imp.ch
Subject: Re: "Re: bin/69361: dhclient sends bogus data to dhcpd and fails to get a lease"
Date: Tue, 10 Aug 2004 13:50:09 -0400 (EDT)

 Ulrich Spoerlein writes:
  > I have to say: me too
  > 
  > This is happening on an up-to-date CURRENT Laptop with a bfe(4) NIC. It
  > really sucks...
 
 If your problem is the same as mine, then a workaround is remove the
 lease file.  Or you can use the dhclient from the very latest dhcp
 suite at ftp://ftp.isc.org/isc/dhcp/dhcp-3.0.1.tar.gz
 
 Martin was going to give me a patch to try 2 weeks ago, but that never
 happened..
 
 Drew
State-Changed-From-To: feedback->closed 
State-Changed-By: mbr 
State-Changed-When: Mon Aug 16 21:32:00 GMT 2004 
State-Changed-Why:  
Fixed in HEAD. Submitter has tested the actual version and the 
fix worked. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69361 
>Unformatted:
