Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 185472 - net-misc/dhcpcd-3.x times out while waiting for address.
Summary: net-misc/dhcpcd-3.x times out while waiting for address.
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-15 22:30 UTC by bunkacid
Modified: 2007-07-26 10:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
dhcpcd-2.0.5-r1 trace (dhcpcd-2.0.5-r1.trace,9.84 KB, application/octet-stream)
2007-07-16 09:02 UTC, bunkacid
Details
dhcpcd-3.0.19.failing.trace (dhcpcd-3.0.19.failing.trace,24.27 KB, application/octet-stream)
2007-07-16 09:02 UTC, bunkacid
Details
dhcpcd-3.0.19.manual-working.trace (dhcpcd-3.0.19.manual-working.trace,6.82 KB, application/octet-stream)
2007-07-16 09:03 UTC, bunkacid
Details
Work with overloaded options (dhcpcd-overload.patch,2.89 KB, patch)
2007-07-16 10:05 UTC, Roy Marples (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bunkacid 2007-07-15 22:30:03 UTC
I'm traveling and the hotel's dhcp server where I am staying seems to dislike dhcpcd-3.x
I have tried both 3.0.19 and 3.0.16-r1, both fail with the same error.

net-misc/dhcpcd-2.0.5-r1 works as expected.

I will be here until the 18th if more information about the location is needed.  Otherwise, the 2.x will suffice until I return home.

Reproducible: Always

Steps to Reproduce:
1.  try to get an address using dhcpcd
2.
3.

Actual Results:  
### dhcpcd-3.0.19 results ###
Jul 15 15:13:11 pmobilex dhcpcd[18970]: eth0: dhcpcd 3.0.19 starting
Jul 15 15:13:11 pmobilex dhcpcd[18970]: eth0: hardware address = 00:a0:cc:df:29:25
Jul 15 15:13:11 pmobilex dhcpcd[18970]: eth0: broadcasting for a lease
Jul 15 15:13:11 pmobilex dhcpcd[18970]: eth0: sending DHCP_DISCOVER with xid 0x408fef88
Jul 15 15:13:11 pmobilex dhcpcd[18970]: eth0: waiting on select for 15 seconds
Jul 15 15:13:14 pmobilex dhcpcd[18970]: eth0: sending DHCP_DISCOVER with xid 0x408fef88
Jul 15 15:13:15 pmobilex [ 1109.050801] eth0: Media Link On 100mbps full-duplex 
Jul 15 15:13:17 pmobilex dhcpcd[18970]: eth0: sending DHCP_DISCOVER with xid 0x408fef88
Jul 15 15:13:20 pmobilex dhcpcd[18970]: eth0: sending DHCP_DISCOVER with xid 0x408fef88
Jul 15 15:13:21 pmobilex dhcpcd[18970]: eth0: got a packet with xid 0x408fef88
Jul 15 15:13:21 pmobilex dhcpcd[18970]: eth0: no facility to parse DHCP code 52
Jul 15 15:13:21 pmobilex dhcpcd[18970]: eth0: offered 192.168.0.97 from 192.168.0.1 `�'
Jul 15 15:13:21 pmobilex dhcpcd[18970]: eth0: sending DHCP_REQUEST with xid 0x408fef88
Jul 15 15:13:21 pmobilex dhcpcd[18970]: eth0: waiting on select for 5 seconds
Jul 15 15:13:24 pmobilex dhcpcd[18970]: eth0: sending DHCP_REQUEST with xid 0x408fef88
Jul 15 15:13:25 pmobilex dhcpcd[18970]: eth0: got a packet with xid 0x408fef88
Jul 15 15:13:25 pmobilex dhcpcd[18970]: eth0: no facility to parse DHCP code 52
Jul 15 15:13:25 pmobilex dhcpcd[18970]: eth0: got subsequent offer of 192.168.0.97, ignoring 
Jul 15 15:13:25 pmobilex dhcpcd[18970]: eth0: waiting on select for 1 seconds
Jul 15 15:13:26 pmobilex dhcpcd[18970]: eth0: timed out
Jul 15 15:13:26 pmobilex dhcpcd[18970]: eth0: exiting

### dhcpcd-2.0.5-r1 results  ####
Jul 15 15:24:16 pmobilex dhcpcd[23606]: MAC address = 00:a0:cc:df:29:25
Jul 15 15:24:16 pmobilex dhcpcd[23606]: broadcasting DHCP_DISCOVER
Jul 15 15:24:20 pmobilex [ 1772.940442] eth0: Media Link On 100mbps full-duplex 
Jul 15 15:24:24 pmobilex dhcpcd[23606]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.
Jul 15 15:24:24 pmobilex dhcpcd[23606]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec
Jul 15 15:24:24 pmobilex dhcpcd[23606]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec
Jul 15 15:24:24 pmobilex dhcpcd[23606]: DHCP_OFFER received from � (192.168.0.1)
Jul 15 15:24:24 pmobilex dhcpcd[23606]: broadcasting DHCP_REQUEST for 192.168.0.97
Jul 15 15:24:28 pmobilex dhcpcd[23606]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.
Jul 15 15:24:28 pmobilex dhcpcd[23606]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec
Jul 15 15:24:28 pmobilex dhcpcd[23606]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec
Jul 15 15:24:28 pmobilex dhcpcd[23606]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.
Jul 15 15:24:28 pmobilex dhcpcd[23606]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec
Jul 15 15:24:28 pmobilex dhcpcd[23606]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec
Jul 15 15:24:28 pmobilex dhcpcd[23606]: DHCP_ACK received from � (192.168.0.1)
Jul 15 15:24:28 pmobilex dhcpcd[23606]: broadcasting ARPOP_REQUEST for 192.168.0.97
Jul 15 15:24:28 pmobilex dhcpcd[23606]: verified 192.168.0.97 address is not in use
Jul 15 15:24:28 pmobilex dhcpcd[23606]: your IP address = 192.168.0.97
Jul 15 15:24:28 pmobilex dhcpcd[23606]: gethostby*.getanswer: asked for "97.0.168.192.in-addr.arpa IN PTR", got type "A"
Jul 15 15:24:28 pmobilex dhcpcd[23606]: orig hostname = pmobilex


Expected Results:  
success

Portage 2.1.3_rc8 (default-linux/x86/2006.1/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.19-gentoo-r5 i686)
=================================================================
System uname: 2.6.19-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 2.53GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 12 Jul 2007 12:20:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.15.92.0.2-r10, 2.16.1-r3, 2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe -fvisibility-inlines-hidden"
DISTDIR="/var/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="candy ccache digest distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.llarian.net/ http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.mirrors.pair.com/ http://mirrors.acm.cs.rpi.edu/gentoo/ http://mirror.datapipe.net/gentoo http://www.gigaload.org/gentoo.org/"
MAKEOPTS="-j2"
PKGDIR="/var/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=180 --exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/portage/local/layman/toolchain /var/portage/local/layman/initng /var/portage/local/layman/ns1-overlay /var/portage/local/layman/sunrise /var/portage/local/layman/einit"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X accessibility alsa bash-completion berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus dri dts dvd dvdr emboss encode esd fam firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jikes jpeg kdeenablefinal ldap libg++ logrotate mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre perl png ppds pppd python qt4 quicktime readline reflection sdl session sox spell spl sse sse2 ssl svg tcpd truetype truetype-fonts type1-fonts unicode vorbis win32codecs x86 xinerama xml xorg xv zlib" ALSA_CARDS="intel8x0 intel8x0m usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INITNG_PLUGINS="also bash_launcher chdir chroot conflict cpout critical ctrlaltdel daemon_clean dbus_event debug_commands envparser find fstat history idleprobe initctl interactive iparser last limit logfile netdev netprobe ngc4 pause provide reload renice rlparser simple_launcher stcmd stdout suid syncron syslog sysreq unneeded" INPUT_DEVICES="evdev joystick keyboard mouse synaptics vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIRC_DEVICES="all" USERLAND="GNU" VIDEO_CARDS="nvidia v4l vesa vga vmware"
Unset:  CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-07-16 06:40:48 UTC
Could you attach a wireshark trace of dhcpcd versions 2.0.5-r1 and 3.0.19 please?

Also, what dhcp server are you using? Include version and OS if you know.
Comment 2 bunkacid 2007-07-16 09:01:04 UTC
(In reply to comment #1)
> Could you attach a wireshark trace of dhcpcd versions 2.0.5-r1 and 3.0.19
> please?
> 
> Also, what dhcp server are you using? Include version and OS if you know.
> 

I'm going to attach the wireshark traces that were requested.

2.0.5-r1, working

3.0.19 which does not work.
and

 3.0.19 which works when running dhcpcd manually;

sudo killall -9 dhcpcd ; sudo rm /var/run/dhcpcd-eth0.pid ;sudo /sbin/dhcpcd -d -t 15 -m 0 -h pmobilex-eth0 eth0

Comment 3 bunkacid 2007-07-16 09:02:04 UTC
Created attachment 124997 [details]
dhcpcd-2.0.5-r1 trace
Comment 4 bunkacid 2007-07-16 09:02:46 UTC
Created attachment 124999 [details]
dhcpcd-3.0.19.failing.trace
Comment 5 bunkacid 2007-07-16 09:03:28 UTC
Created attachment 125001 [details]
dhcpcd-3.0.19.manual-working.trace
Comment 6 bunkacid 2007-07-16 09:06:00 UTC
Also...
I'm not sure of the dhcp servers OS/version etc.  Also it's not my server so I'm not 100% sure how much I want to probe it other than nmap.

Starting Nmap 4.20 ( http://insecure.org ) at 2007-07-16 02:03 MST
Stats: 0:00:44 elapsed; 0 hosts completed (1 up), 1 undergoing SYN Stealth Scan
SYN Stealth Scan Timing: About 88.69% done; ETC: 02:04 (0:00:04 remaining)
Warning:  OS detection for 192.168.0.1 will be MUCH less reliable because we did not find at least 1 open and 1 closed TCP port
All 1697 scanned ports on 192.168.0.1 are filtered
MAC Address: 00:90:0E:00:BF:5A (Handlink Technologies)
Too many fingerprints match this host to give specific OS details
Network Distance: 1 hop

OS detection performed. Please report any incorrect results at http://insecure.org/nmap/submit/ .
Nmap finished: 1 IP address (1 host up) scanned in 49.715 seconds
Comment 7 Roy Marples (RETIRED) gentoo-dev 2007-07-16 10:05:16 UTC
Created attachment 125004 [details, diff]
Work with overloaded options

For some silly reason the dhcp server is overloading some fields. This patch will solve that problem, but I cannot see any reason why it should fail though. See if it helps any though :)

Lastly, try increasing the timeout.
Comment 8 bunkacid 2007-07-16 22:08:22 UTC
My timeout was set to -t 15.
Increasing the timeout to 20 in /etc/conf.d/net worked with 3.0.19

After patching 3.0.19
I increased the timeout to 20, as suggested, and that works.
Leaving my timeout set to 15 still fails.
Also I tried without setting a timeout to use the default(20?) timeout, it also works.

After looking through my logs, it still seems to get the address offers and ignores them.


Jul 16 14:55:39 pmobilex dhcpcd[21233]: eth0: dhcpcd 3.0.19 starting
Jul 16 14:55:39 pmobilex dhcpcd[21233]: eth0: hardware address = 00:a0:cc:df:29:25
Jul 16 14:55:39 pmobilex dhcpcd[21233]: eth0: broadcasting for a lease
Jul 16 14:55:39 pmobilex dhcpcd[21233]: eth0: sending DHCP_DISCOVER with xid 0x1cc56079
Jul 16 14:55:39 pmobilex dhcpcd[21233]: eth0: waiting on select for 20 seconds
Jul 16 14:55:42 pmobilex dhcpcd[21233]: eth0: sending DHCP_DISCOVER with xid 0x1cc56079
Jul 16 14:55:42 pmobilex [ 4470.924178] eth0: Media Link On 100mbps full-duplex 
Jul 16 14:55:45 pmobilex dhcpcd[21233]: eth0: sending DHCP_DISCOVER with xid 0x1cc56079
Jul 16 14:55:47 pmobilex dhcpcd[21233]: eth0: got a packet with xid 0x1cc56079
Jul 16 14:55:47 pmobilex dhcpcd[21233]: eth0: offered 192.168.0.6 from 192.168.0.1
Jul 16 14:55:47 pmobilex dhcpcd[21233]: eth0: sending DHCP_REQUEST with xid 0x1cc56079
Jul 16 14:55:47 pmobilex dhcpcd[21233]: eth0: waiting on select for 12 seconds
Jul 16 14:55:48 pmobilex [ 4476.595468] eth0: no IPv6 routers present
Jul 16 14:55:50 pmobilex dhcpcd[21233]: eth0: sending DHCP_REQUEST with xid 0x1cc56079
Jul 16 14:55:51 pmobilex dhcpcd[21233]: eth0: got a packet with xid 0x1cc56079
Jul 16 14:55:51 pmobilex dhcpcd[21233]: eth0: got subsequent offer of 192.168.0.6, ignoring 
Jul 16 14:55:51 pmobilex dhcpcd[21233]: eth0: waiting on select for 8 seconds
Jul 16 14:55:54 pmobilex dhcpcd[21233]: eth0: sending DHCP_REQUEST with xid 0x1cc56079
Jul 16 14:55:54 pmobilex dhcpcd[21233]: eth0: waiting on select for 5 seconds
Jul 16 14:55:55 pmobilex dhcpcd[21233]: eth0: got a packet with xid 0x1cc56079
Jul 16 14:55:55 pmobilex dhcpcd[21233]: eth0: got subsequent offer of 192.168.0.6, ignoring 
Jul 16 14:55:55 pmobilex dhcpcd[21233]: eth0: waiting on select for 4 seconds
Jul 16 14:55:55 pmobilex dhcpcd[21233]: eth0: got a packet with xid 0x1cc56079
Jul 16 14:55:55 pmobilex dhcpcd[21233]: eth0: leased 192.168.0.6 for 5999940 seconds
Jul 16 14:55:55 pmobilex dhcpcd[21233]: eth0: no renewal time supplied, assuming 2999970 seconds
Jul 16 14:55:55 pmobilex dhcpcd[21233]: eth0: no rebind time supplied, assuming 5249947 seconds
Jul 16 14:55:55 pmobilex dhcpcd[21233]: eth0: setting MTU to 576
Jul 16 21:55:55 pmobilex avahi-daemon[8410]: Withdrawing address record for fe80::2a0:ccff:fedf:2925 on eth0.
Jul 16 14:55:55 pmobilex dhcpcd[21233]: eth0: adding IP address 192.168.0.6/24
Jul 16 14:55:55 pmobilex dhcpcd[21233]: eth0: adding default route via 192.168.0.1 metric 0
Jul 16 14:55:55 pmobilex dhcpcd[21233]: eth0: writing /etc/resolv.conf
Jul 16 14:55:55 pmobilex dhcpcd[21233]: eth0: writing /var/lib/dhcpcd/dhcpcd-eth0.info
Jul 16 14:55:55 pmobilex dhcpcd[21233]: eth0: forking to background
Jul 16 14:55:55 pmobilex dhcpcd[21234]: eth0: waiting on select for 2999970 seconds
Comment 9 Roy Marples (RETIRED) gentoo-dev 2007-07-17 00:41:02 UTC
At least the patch fixes the option 52 error.
I think what you're seeing is because the server is taking too long to respond. I'll see if I can adjust the delay-resend algorythm a little.
Comment 10 Roy Marples (RETIRED) gentoo-dev 2007-07-26 10:38:23 UTC
I don't think there's anything to fix here - the default timeout of 20 seconds works for you.