Bug 11993 - Pump does not increment secs field in DHCP DISCOVER packet
Pump does not increment secs field in DHCP DISCOVER packet
Product: Red Hat Linux
Classification: Retired
Component: pump (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Erik Troan
Depends On:
  Show dependency treegraph
Reported: 2000-06-08 15:08 EDT by tlau
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-09-11 14:02:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description tlau 2000-06-08 15:08:42 EDT
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 14:02:19 EDT
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 18:27:50 EST
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-09 22:40:20 EST
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.