Just went through the same thing myself. I have RH5.2 running and had set
up the DHCP client with the dhcpcd supplied (version 0.7, I believe).
Packet exchange with the DHCP server appeared to be correct, and the server
showed that it had indeed checked out the address, but the interface was
never updated with the ip/netmask.
In frustration, I downloaded the 1.3.16 version of dhcpcd, compiled and ran
it with the same results that you are seeing. When I did a man on socket,
I saw that it did not support this Address Family (AF_PACKET). I tried
changing the call to:
to set up a standard UDP port but ended up getting wierder errors in later
parts of the code.
SO, what I realized is that this version of dhcpcd was written for a newer
version of the kernel (2.2.x) with updated libraries to handle the
AF_PACKET family. So I took the plunge and compiled a new kernel (2.2.5,
same as RH 6.0), and now the dhcpcd works beautifully.
Why the older dhcpcd didn't work for me I never found out. Maybe somebody
else has had some experience getting that to work. But upgrading the
kernel and using the newer dhcpcd has worked great for me.
Hope that helps. Good luck!
> I am new to Linux (Sun background) and am trying to get a DHCP client
> connection to RoadRunner. I have a brand new system from VA Research
> running RedHat 5.2. No source code.
> Using "rpm -q" I found the machine is running dhcpcd version 1.3.16.
> I downloaded and compiled the source from metalab.unc.edu. It compiles
> and links without any warnings or errors. The library call that is
> failing, which is in client.c, looks like this ...
> int dhcpStart()
> int o = 1;
> struct ifreq ifr;
> memset(&ifr,0,sizeof(struct ifreq));
> dhcpSocket = socket(AF_PACKET,SOCK_PACKET,htons(ETH_P_ALL));
> if ( dhcpSocket == -1 )
> syslog(LOG_ERR,"dhcpStart: socket: %m\n");
> Can anyone give me a clue as to how to troubleshoot this?
> The Makefile has no references to any libraries, so I have
> no idea how to verify the presence or version numbers of
> the libraries dhcpcd depends upon.
> Larry Breyer