Bug 6339 - busybox dhcp client not started reliable
Summary: busybox dhcp client not started reliable
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: connectivity (show other bugs)
Version: 1.5.1
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.5.3
Assignee: Saul Wold
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-05-15 15:55 UTC by Volker
Modified: 2014-06-06 18:29 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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