I updated today to net-misc/dhcpcd-3.2.3, and one of my computers is unable to get an address from my ISP's dhcp server. I downgraded to dhcpcd-3.1.5-r1 and it works again. Here's some info about the computer: # uname -a Linux morpheus 2.6.19-gentoo-r5 #3 PREEMPT Sat Jul 28 11:24:36 CEST 2007 i686 Intel(R) Celeron(R) CPU 1.80GHz GenuineIntel GNU/Linux dhcpcd is run on eth2, which is connected to a cable modem. The network card is driven by the sis900 driver and is a: 00:04.0 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet (rev 91) Looking at a traffic dump from tcpdump and an strace of the dhcpcd process, it looks as if the DHCP server is actually responding, but dhcpcd never gets the reply. Something wrong in the packet filter program (IIUC the big difference between 3.1.5 and 3.2.3)? I will attach the traffic dump and the strace output.
Created attachment 147535 [details] Traffic dump from tcpdump This is the output of: tcpdump -nl -i eth2 port 68 -vvv -XX It shows that every request received a reply.
Created attachment 147537 [details] Output of an strace of dhcpcd This is the output of: strace ./dhcpcd --test eth2 It shows that the process didn't receive any of the replies from the server. Please let me know if you need any additional info.
Created attachment 147542 [details] Output of emerge --info
Some additional info: if I disable the packet filter by commenting out the setsockopt(fs, SOL_SOCKET, SO_ATTACH_FILTER, ...) call in socket.c, I can run dhcpcd --test eth2 successfully.
More news (sorry for spamming): If I replace the following line in the packet filter program: BPF_STMT (BPF_RET + BPF_K, ~0U), with that one: BPF_STMT (BPF_RET + BPF_K, 65536), then dhcpcd --test eth2 works. Actually, any number big enough but lower than or equal to 2^31-1 seems to work. 2^31 doesn't work anymore. So it looks like the packet filter doesn't like "negative" values (actually, the value is stored as unsigned, so it normally shouldn't care). Could this be due to a bug in my kernel version? On another machine, dhcpcd-3.2.3 works flawlessly: $ uname -a Linux pat 2.6.22-rbl-r9 #1 PREEMPT Fri Nov 2 23:17:14 CET 2007 i686 Intel(R) Pentium(R) M processor 1.60GHz GenuineIntel GNU/Linux I'll start looking at the kernel changelog, and I'll try to update the older machine to 2.6.24.
Try replacing it with BPF_STMT (BPF_RET + BPF_K, (uint)-1),
But yes, please try a newer kernel as well :)
(In reply to comment #6) > Try replacing it with > > BPF_STMT (BPF_RET + BPF_K, (uint)-1), Doesn't work either. For the newer kernel, it will take a bit more time, but I'll get there eventually.
Ok, I got it. The fix was committed here: http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.24.y.git;a=commit;h=dbcb5855d108b7fa20ab42567a5412ce9dcd776a Sorry for the noise.