Bug 6339

Summary: busybox dhcp client not started reliable
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Volker <lists.volker>
Component: connectivityAssignee: Saul Wold <sgw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, poky.bs.watcher, poky.watcher, sgw
Version: 1.5.1   
Target Milestone: 1.5.3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Volker 2014-05-15 15:55:35 UTC
Busybox udhcpc does not run as daemon in some cases. As result you will not receive an IP address automatically in the following two cases:

  Case 1: network is not connected on boot
  Case 2: network is connected but dhcp server is not responding

As result, I do not see that the busybox udhcpc can be used as reliable dhcp client out of the box.

When googling for it I found a case where something similar was already an issue in 2011 (https://lists.yoctoproject.org/pipermail/poky/2011-August/006931.html).

There is also a recent discussion about it on https://www.mail-archive.com/yocto@yoctoproject.org/msg18869.html but does not provide a final solution.

http://patchwork.openembedded.org/patch/33183/ describes why the service was removed in 2012.


Yes, if you get an IP address on boot, udhcpc does seem to run in the background to renew the lease etc. But first you need to get it running this way.  ifplugd does also not look like a solution, because it does not seem to be able to handle case 2.
Comment 1 Volker 2014-05-15 18:16:27 UTC
Based on the entry from 2011 the following will fix the entire bug:

   do_prepare_config_append () {
      sed -i 's/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n -b"/' ${S}/.config
   }

I would also add "-S" to it, but that is not required for this bug.

See http://www.busybox.net/downloads/BusyBox.html for flag arguments.
   -b,--background Background if lease is not immediately obtained
   -S,--syslog     Log to syslog too
Comment 2 Saul Wold 2014-05-22 14:36:31 UTC
If your patch is good, please submit it to the oe-core list