diff mbox series

busybox: background udhcpc by default if no lease is obtained

Message ID 20211216124048.5968-1-lothar.felten@gmail.com
State Accepted
Headers show
Series busybox: background udhcpc by default if no lease is obtained | expand

Commit Message

Lothar Felten Dec. 16, 2021, 12:40 p.m. UTC
The current behavior for busybox' udhcpc is to terminate if no lease is
obtained at start up. Therefore no address is acquired if the link is
established afterwards.

By setting the -b flag udhcpc will background allowing the link to be
established at any time.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
 package/busybox/busybox.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Korsgaard Jan. 8, 2022, 12:30 p.m. UTC | #1
>>>>> "Lothar" == Lothar Felten <lothar.felten@gmail.com> writes:

 > The current behavior for busybox' udhcpc is to terminate if no lease is
 > obtained at start up. Therefore no address is acquired if the link is
 > established afterwards.

 > By setting the -b flag udhcpc will background allowing the link to be
 > established at any time.

 > Signed-off-by: Lothar Felten <lothar.felten@gmail.com>

I was afraid that this would break the avahi-autoipd fallback logic, but
looking at the udhcpc logic it still triggers the leasefail action on
timeout, so that should be fine.

 > ---
 >  package/busybox/busybox.config | 2 +-
 >  1 file changed, 1 insertion(+), 1 deletion(-)

 > diff --git a/package/busybox/busybox.config b/package/busybox/busybox.config
 > index 1ea810e5be..a854747286 100644
 > --- a/package/busybox/busybox.config
 > +++ b/package/busybox/busybox.config
 > @@ -970,7 +970,7 @@ CONFIG_UDHCP_DEBUG=0
 >  CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
 >  CONFIG_FEATURE_UDHCP_RFC3397=y
 >  CONFIG_FEATURE_UDHCP_8021Q=y
 > -CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n -O search"
 > +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-b -R -n -O search"

Using -b (background on lease fail) and -n (exit on lease fail) together
doesn't make much sense, so I've dropped -n. We also have
busybox-minimal.config, so I've added it there as well and applied,
thanks.
diff mbox series

Patch

diff --git a/package/busybox/busybox.config b/package/busybox/busybox.config
index 1ea810e5be..a854747286 100644
--- a/package/busybox/busybox.config
+++ b/package/busybox/busybox.config
@@ -970,7 +970,7 @@  CONFIG_UDHCP_DEBUG=0
 CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
 CONFIG_FEATURE_UDHCP_RFC3397=y
 CONFIG_FEATURE_UDHCP_8021Q=y
-CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n -O search"
+CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-b -R -n -O search"
 
 #
 # Print Utilities