| Summary: | udhcpc stop getting address from dhcp server from version 1.19.0 and up | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Gianluca Renzi <gianlucarenzi> |
| Component: | Networking | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.19.x | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: |
Log-A Show how DHCP client fails to react to servers messages
Log-B Shows working Busybox (1.12.3) DHCP clients traffic |
||
Please attach "tcpdump -nlieth0 -vvv -s0 -exX udp port 67 or port 68" output for both working and non-working cases. Closing as WORKSFORME (it indeed works for me). Reopen if you have additional information. (In reply to comment #2) > Closing as WORKSFORME (it indeed works for me). Reopen if you have additional > information. Sorry for answering so late. In the next few days I will able to printout the tcpdump command as you asked. Best regards, (In reply to comment #2) > Closing as WORKSFORME (it indeed works for me). Reopen if you have additional > information. Sorry for answering so late. In the next few days I will able to printout the tcpdump command as you asked. Best regards, Created attachment 4118 [details]
Log-A Show how DHCP client fails to react to servers messages
Created attachment 4124 [details]
Log-B Shows working Busybox (1.12.3) DHCP clients traffic
I reproduced bug in ARM ESW system using 2.6.19.2 – kernel and Busybox version 1.19.4 (log A). Using same system but build with Busybox version 1.3.1 (log B) I couldn’t reproduce bug. Busybox 1.12.3 also didn’t reproduce bug (no log). When bug appears select()-call in udhcpc.c: udhcpc_main() always ends with timeout. My guess is that tcpsocket filter in new Busybox is not compatible with old kernel, and prevent socket from receiving DHCP servers packets. Could my guess be onto something? I’ll commented out the filter to see if it really is the problem cause, and it fixed issue. After fix DHCP client worked normally. Commented out line was in udhcpc.c: udhcp_raw_socket(): setsockopt(...) Br Fixed in git: commit e4785ca653d0e219926692c229673b2c1b8d6ac4 Author: Denys Vlasenko <vda.linux@googlemail.com> Date: Mon Feb 3 18:03:42 2014 +0100 udhcpc: don't use BPF filter, users report problems (bugs 4598, 6746) |
I am using for ages busybox in my own cross-build environments all based on ARM. Last time I upgraded busybox was from an ancient version (pre-1.0 or similar) to 1.18.4. The only thing I had to patch was a fbsplash utility to support screen depth higher than 16bpp. Everything was working fine. After some months I decided to upgrade to 1.18.5 (with the same configuration files as the procedure is fully automatic). Everything is working fine until I tried the 1.19.2 version, because of an already patched framebuffer utilities to support 24/32 bpp depth. Now the udhcpc client is not getting any address anymore from my dhcp server. The same problem appear in version 1.19.2 and 1.19.3. The only workaround I found is replace the dhcpc.c/.h from 1.18.5 to higher version, and luckily it compiles and runs properly in my hardware. Here is my specs: Platform A: Samsung S3C2442 (arm toolchain 4.1.1) Linux Kernel: 2.6.27 Platform B: Freescale i.MX27 (arm toolchain 4.1.1) Linux Kernel: 2.6.19.2 Here is an (almost) detailed log of WORKING (1.18.5) busybox installation: # busybox BusyBox v1.18.5 (2011-12-12 12:37:09 GMT) multi-call binary. Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko and others. Licensed under GPLv2. See source distribution for full notice. Usage: busybox [function] [arguments]... or: busybox --list[-full] or: function [arguments]... BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. Most people will create a link to busybox for each function they wish to use and BusyBox will act like whatever it was invoked as. Currently defined functions: [, [[, addgroup, adduser, adjtimex, ar, arp, arping, ash, awk, base64, basename, beep, bootchartd, brctl, bunzip2, bzcat, cal, cat, chgrp, chmod, chown, chpasswd, chroot, chvt, clear, cmp, comm, cp, cpio, crond, crontab, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod, df, dirname, dmesg, dnsdomainname, dos2unix, dpkg, dpkg-deb, du, dumpkmap, echo, ed, egrep, env, expr, false, fbset, fbsplash, fdisk, fgrep, find, fold, free, ftpget, ftpput, getopt, getty, grep, gunzip, gzip, halt, hd, head, hexdump, hostid, hostname, httpd, hwclock, id, ifconfig, ifdown, ifenslave, ifplugd, ifup, init, inotifyd, insmod, install, ionice, ipcalc, kill, killall, killall5, klogd, last, length, less, linuxrc, ln, loadfont, loadkmap, logger, login, logread, losetup, ls, lsmod, lsusb, makedevs, md5sum, mkdir, mkdosfs, mkfs.vfat, mknod, mkswap, mktemp, modinfo, modprobe, more, mount, mv, nameif, nbd-client, nc, netstat, nice, nohup, nslookup, od, openvt, passwd, patch, pidof, ping, ping6, pipe_progress, pivot_root, poweroff, printf, ps, pwd, rdate, readlink, readprofile, realpath, reboot, renice, reset, rm, rmdir, rmmod, route, rpm, run-parts, rx, sed, sendmail, seq, setkeycodes, sh, sleep, sort, start-stop-daemon, stat, strings, stty, su, sulogin, sum, swapoff, swapon, sync, sysctl, syslogd, tail, tee, telnet, telnetd, test, tftp, tftpd, time, top, touch, tr, traceroute, traceroute6, true, tty, udhcpc, umount, uname, uncompress, uniq, unix2dos, unzip, uptime, usleep, uudecode, uuencode, vi, vlock, watchdog, wc, wget, which, who, whoami, xargs, yes, zcat # udhcpc -v Adapter index 2 MAC 00:60:35:10:7e:ff udhcpc (v1.18.5) started Executing /usr/share/udhcpc/default.script deconfig eth0: status: link is up eth0: config: auto-negotiation on, 100FDX, 100HDX, 10FDX, 10HDX. Entering listen mode: raw Opening raw socket on ifindex 2 Got raw socket fd 5 Attached filter to raw socket fd 5 Created raw socket Adapter index 2 MAC 00:60:35:10:7e:ff Sending discover... Waiting on select... Adapter index 2 MAC 00:60:35:10:7e:ff Sending discover... Waiting on select... NETDEV WATCHDOG: eth0: transmit timed out eth0: transmit timed out. Got valid DHCP packet Adapter index 2 MAC 00:60:35:10:7e:ff Sending select for 192.168.143.151... Waiting on select... Got valid DHCP packet Waiting on select... Got valid DHCP packet Lease of 192.168.143.151 obtained, lease time 14400 Executing /usr/share/udhcpc/default.script bound deleting routers route: SIOCDELRT: No such process adding dns 192.168.143.2 adding dns 8.8.8.8 Entering listen mode: none and now the NON WORKING busybox udhcpc installation on the same hardware: # busybox BusyBox v1.19.0 (2011-12-12 12:44:52 GMT) multi-call binary. Copyright (C) 1998-2011 Erik Andersen, Rob Landley, Denys Vlasenko and others. Licensed under GPLv2. See source distribution for full notice. Usage: busybox [function] [arguments]... or: busybox --list[-full] or: function [arguments]... BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. Most people will create a link to busybox for each function they wish to use and BusyBox will act like whatever it was invoked as. Currently defined functions: [, [[, addgroup, adduser, adjtimex, ar, arp, arping, ash, awk, base64, basename, beep, bootchartd, brctl, bunzip2, bzcat, cal, cat, chgrp, chmod, chown, chpasswd, chroot, chvt, clear, cmp, comm, cp, cpio, crond, crontab, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod, df, dirname, dmesg, dnsdomainname, dos2unix, dpkg, dpkg-deb, du, dumpkmap, echo, ed, egrep, env, expr, false, fbset, fbsplash, fdisk, fgrep, find, fold, free, ftpget, ftpput, getopt, getty, grep, gunzip, gzip, halt, hd, head, hexdump, hostid, hostname, httpd, hwclock, id, ifconfig, ifdown, ifenslave, ifplugd, ifup, init, inotifyd, insmod, install, ionice, ipcalc, kill, killall, killall5, klogd, last, less, linuxrc, ln, loadfont, loadkmap, logger, login, logread, losetup, ls, lsmod, lsusb, makedevs, md5sum, mkdir, mkdosfs, mkfs.vfat, mknod, mkswap, mktemp, modinfo, modprobe, more, mount, mv, nameif, nbd-client, nc, netstat, nice, nohup, nslookup, od, openvt, passwd, patch, pidof, ping, ping6, pipe_progress, pivot_root, poweroff, printf, ps, pwd, rdate, readlink, readprofile, realpath, reboot, renice, reset, rm, rmdir, rmmod, route, rpm, run-parts, rx, sed, sendmail, seq, setkeycodes, sh, sleep, sort, start-stop-daemon, stat, strings, stty, su, sulogin, sum, swapoff, swapon, sync, sysctl, syslogd, tail, tee, telnet, telnetd, test, tftp, tftpd, time, top, touch, tr, traceroute, traceroute6, true, tty, udhcpc, umount, uname, uncompress, uniq, unix2dos, unzip, uptime, usleep, uudecode, uuencode, vi, vlock, watchdog, wc, wget, which, who, whoami, xargs, yes, zcat # udhcpc -v Adapter index 2 MAC 00:60:35:10:7e:ff udhcpc (v1.19.0) started Executing /usr/share/udhcpc/default.script deconfig eth0: status: link is up eth0: config: auto-negotiation on, 100FDX, 100HDX, 10FDX, 10HDX. Entering listen mode: raw Opening raw socket on ifindex 2 Got raw socket fd 5 Attached filter to raw socket fd 5 Created raw socket Adapter index 2 MAC 00:60:35:10:7e:ff Sending discover... Waiting on select... Adapter index 2 MAC 00:60:35:10:7e:ff Sending discover... Waiting on select... NETDEV WATCHDOG: eth0: transmit timed out eth0: transmit timed out. Adapter index 2 MAC 00:60:35:10:7e:ff Sending discover... Waiting on select... Adapter index 2 MAC 00:60:35:10:7e:ff Executing /usr/share/udhcpc/default.script leasefail Waiting on select... and wait forever (until a CTRL-C) Can you check what is changed between versions 1.18 and 1.19? diff gives me a lot of API changes... Maybe some pitfalls in between?? Best regards, Gianluca