Bug 11993 - Pump does not increment secs field in DHCP DISCOVER packet
Summary: Pump does not increment secs field in DHCP DISCOVER packet
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pump
Version: 6.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Erik Troan
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-06-08 19:08 UTC by tlau
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2000-09-11 18:02:21 UTC

Attachments (Terms of Use)

Description tlau 2000-06-08 19:08:42 UTC
According to RFCs 951 and 2131, the "secs" field in the DHCP protocol
packet should contain the number of seconds since the client started trying
to find an address.  However, in pump 0.7.9, the secs field is always set
to zero.

This results in pump never receiving a DHCP Offer, because our DHCP relay
is configured not to forward packets with a secs field under 3 seconds.

The bug lies on line 580 of file dhcp.c.  First of all, there should be a
htons() call to convert the number of seconds into network byte order. 
However, since this number is always zero, it's not surprising that this
wasn't noticed.

The more insidious bug is that this secs field is never set to anything
greater than zero.  When the packet is created via a call to
prepareRequest(), the startTime value is initialized to the current uptime,
and the secs is computed as the difference between the two (which is always
zero).  I assume that the same packet is then retransmitted several times,
over the course of several seconds, without incrementing the secs field. 
Later, within the same process, prepareRequest() is called again to start
off a second round of DHCP Discover packets, and again it resets the
startTime to the current uptime, resulting in the secs field never being
set to a nonzero time.

I don't have a patch, but it seems like there should be a global startTime
variable that is initialized at program start, and this global variable
should be used to calculate the value for the secs field.

Tessa Lau

Comment 1 John L. Chmielewski 2000-09-11 18:02:19 UTC
Pump has stopped working with RoadRunner on three of the four RedHat Linux 6.2
systems that I maintain.  The supplied dhcpcd clients do work, so I converted
from pump to dhcpcd as a workaround.  As in this case, pump never receives a
DHCP offer, so I think it likely that this problem is the reason that pump
stopped working with RoadRunner, assuming that RoadRunner has been updating
their DHCP server software.

John Chmielewski

Comment 2 Erik Troan 2001-02-01 23:27:50 UTC
I'm going to put a pump-0.8.8 out tonight with this fix; it will be available
from ftp://people.redhat.com/ewt. I'd love to know if this works any better for

There is also a mailing list for pump, sending a message with a subject of
subscribe to pump-list-request@redhat.com will get you on it.

Comment 3 John L. Chmielewski 2001-02-10 03:40:20 UTC
I compiled pump - 0.8.8 and tried to obtain an address from central florida
It failed as before.

Note You need to log in before you can comment on or make changes to this bug.