udhcpd not starting
Denys Vlasenko
vda.linux at googlemail.com
Fri Oct 16 21:34:27 UTC 2009
On Friday 16 October 2009 14:03, Ruben Lagar wrote:
> Thank you for helping with this issue.
>
> I am attaching the init script:
>
> mount -a
> modprobe g_ether
> sleep 1
> ifconfig usb0 10.0.1.83 netmask 255.255.255.0
> /usr/sbin/inetd -f&
> sleep 1
> /usr/sbin/udhcpd
>
> the dmesg output after boot, and the configuration of busybox.
>
> I am working with a device made by another people, so I have not compiled
> the kernel. I have requested them the kernel .config file, so as soon as I
> receive it, I will be able to email it.
>
> I am really lost with this problem, I have no idea on what may be
> happening....
Comparing your dmesg with mine:
# grep 'Registered protocol family' dmesg.txt dmesg
dmesg.txt:<6>NET: Registered protocol family 16
dmesg.txt:<6>NET: Registered protocol family 2
dmesg.txt:<6>NET: Registered protocol family 1
dmesg.txt:<6>NET: Registered protocol family 17
dmesg:NET: Registered protocol family 16
dmesg:NET: Registered protocol family 2
dmesg:NET: Registered protocol family 1
dmesg:NET: Registered protocol family 10
dmesg:NET: Registered protocol family 17
dmesg:NET: Registered protocol family 15
mine only has PF_INET6 and PF_KEY added -
#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
#define PF_INET 2 /* IP protocol family. */
#define PF_INET6 10 /* IP version 6. */
#define PF_KEY 15 /* PF_KEY key management API. */
#define PF_NETLINK 16
#define PF_PACKET 17 /* Packet family. */
which should not be causing this.
Here is the kernel source releavnt to SO_BINDTODEVICE:
if (optname == SO_BINDTODEVICE)
return sock_bindtodevice(sk, optval, optlen);
...
...
static int sock_bindtodevice(struct sock *sk, char __user *optval, int optlen)
{
int ret = -ENOPROTOOPT;
#ifdef CONFIG_NETDEVICES
struct net *net = sock_net(sk);
char devname[IFNAMSIZ];
int index;
/* Sorry... */
ret = -EPERM;
if (!capable(CAP_NET_RAW))
goto out;
ret = -EINVAL;
if (optlen < 0)
goto out;
/* Bind this socket to a particular device like "eth0",
* as specified in the passed interface name. If the
* name is "" or the option length is zero the socket
* is not bound.
*/
if (optlen > IFNAMSIZ - 1)
optlen = IFNAMSIZ - 1;
memset(devname, 0, sizeof(devname));
ret = -EFAULT;
if (copy_from_user(devname, optval, optlen))
goto out;
if (devname[0] == '\0') {
index = 0;
} else {
struct net_device *dev = dev_get_by_name(net, devname);
ret = -ENODEV;
if (!dev)
goto out;
index = dev->ifindex;
dev_put(dev);
}
lock_sock(sk);
sk->sk_bound_dev_if = index;
sk_dst_reset(sk);
release_sock(sk);
ret = 0;
out:
#endif
return ret;
}
Looks like your kernel has NETDEVICES off. This is the only way
this function can return -ENOPROTOOPT.
--
vda
More information about the busybox
mailing list