I run it as root I added that line in the right place
It still doesn't work. When you ask if af_packet is built in my kernel, do you mean the option "Packet socket" under "Networking options"? I am not sure what I should check... Thank you! 2009/10/8 Denys Vlasenko <[email protected]> > On Thursday 08 October 2009 14:11, Ruben Lagar wrote: > > Hello everybody, > > I have successfully cross-compiled busybox for an arm processor. Now I am > > trying to run udhcpd with a very basic config file > > > > > > *start ** **10.0.1.100** * > > *end** **10.0.1.120** * > > *interface** **usb0** * > > *max_leases** **21** * > > *lease_file** **/etc/udhcpd.leases** * > > *pidfile** **/etc/udhcpd.pid** * > > *option** **subnet** **255.255.255.0* > > *option** **domain** **local* > > *option** **lease** **864000* > > > > But when I try to run it, I get an error: > > > > udhcpd (v1.14.1) started > > *udhcpd: can't bind to interface usb0: Protocol not available* > > > > I have been Googling it, and it looks like some Kernel problem or > similar, > > but haven't found exactly what is going on. > > > > Has anyone get this error before? Is there any way around it? > > Here is where it comes from: > > int FAST_FUNC setsockopt_bindtodevice(int fd, const char *iface) > { > int r; > struct ifreq ifr; > strncpy_IFNAMSIZ(ifr.ifr_name, iface); > /* NB: passing (iface, strlen(iface) + 1) does not work! > * (maybe it works on _some_ kernels, but not on 2.6.26) > * Actually, ifr_name is at offset 0, and in practice > * just giving char[IFNAMSIZ] instead of struct ifreq works too. > * But just in case it's not true on some obscure arch... */ > r = setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr)); > if (r) > bb_perror_msg("can't bind to interface %s", iface); > return r; > } > > A few shots in the dark: > > (1) Is af_packet built (CONFIG_FILTER=y/m)? If it's a module (m, not y), > is it inserted? > (2) Do you run udhcpd as root? > (3) Try adding "memset(&ifr, 0, sizeof(ifr));" before strncpy_IFNAMSIZ. > > -- > vda >
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
