Notes |
(0001636)
teg
09-19-06 01:38
|
When it dies, It reports:
debug, Sending renew...
error, FATAL: couldn't listen on socket, No such device |
| |
(0001669)
bernhardf
09-30-06 13:51
|
I recommend you to use the version of udhcp that is in busybox. AFAIK the stand-alone udhcpd currently isn't actively maintained as opposed to the version in busybox.
If you do not need any other applets from busybox, then just turn them off.
HTH |
| |
(0001679)
teg
10-01-06 03:15
|
I AM using busybox version. |
| |
(0001681)
bernhardf
10-01-06 05:47
|
Reported against wrong project; Assigning to busybox. |
| |
(0001814)
vda
11-27-06 12:10
|
Need a bit of help debugging it. It happens here:
if (listen_mode != LISTEN_NONE && fd < 0) {
if (listen_mode == LISTEN_KERNEL)
fd = listen_socket(INADDR_ANY, CLIENT_PORT, client_config.interface);
else
fd = raw_socket(client_config.ifindex);
if (fd < 0) {
bb_perror_msg("FATAL: cannot listen on socket");
return 0;
Can you check that it happens in listen_socket? (Just add a printf before it).
Next, listen_socket() itself is in socket.c. Please add this line with '+'. What does this printf prints for you?
strncpy(interface.ifr_name, inf, IFNAMSIZ);
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, (char *)&interface, sizeof(interface)) < 0) {
+printf("BINDTODEVICE '%s' failed\n", inf);
close(fd);
return -1;
} |
| |
(0001816)
teg
11-27-06 12:13
|
I'm using it on a Linksys router, but I don't have development environment currently installed. I'll try to set up that first for debugging. |
| |
(0001829)
vda
11-28-06 16:16
|
Most likely fixed in svn. Bug is to be closed after a few weeks unless svn is reported to not work. |
| |
(0001831)
teg
11-28-06 23:54
|
Here you are:
root@linksys2:~# ./busybox udhcpc -f -c x.x.x.x -i vlan1:7 -p /tmp/dhcp.test.pid
info, udhcpc (v0.9.9-pre) started
SIOCSIFFLAGS: Cannot assign requested address
debug, Sending discover...
debug, Sending select for x.x.x.x...
info, Lease of x.x.x.x obtained, lease time 3600
deleting routers
adding router x.x.x.x
adding dns x.x.x.x
adding dns x.x.x.x
debug, Sending renew...
Listen socket
BINDTODEVICE 'vlan1:7' failed
error, FATAL: couldn't listen on socket, No such device |
| |
(0014334)
vda
10-27-08 05:55
|
Current svn has these routines renamed to:
udhcp_raw_socket
udhcp_listen_socket
I suspect on ethN:M aliases udhcp_raw_socket works, but udhcp_listen_socket does not. Can you verify it? Add "entered" / "exited ok" printouts to both functions:
int FAST_FUNC udhcp_raw_socket(int ifindex)
{
int fd;
struct sockaddr_ll sock;
bb_error_msg("raw_socket %d entered", ifindex);
...
bb_error_msg("raw_socket %d succeeded", ifindex);
return fd;
}
(do the same for udhcp_listen_socket)
Does it indeed fail on the _first_ call to udhcp_listen_socket()? |
| |