All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] busybox: background udhcpc by default if no lease is obtained
@ 2021-12-16 12:40 Lothar Felten
  2022-01-08 12:30 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Lothar Felten @ 2021-12-16 12:40 UTC (permalink / raw)
  To: buildroot; +Cc: Lothar Felten

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(-)

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
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH] busybox: background udhcpc by default if no lease is obtained
  2021-12-16 12:40 [Buildroot] [PATCH] busybox: background udhcpc by default if no lease is obtained Lothar Felten
@ 2022-01-08 12:30 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2022-01-08 12:30 UTC (permalink / raw)
  To: Lothar Felten; +Cc: buildroot

>>>>> "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.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-08 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16 12:40 [Buildroot] [PATCH] busybox: background udhcpc by default if no lease is obtained Lothar Felten
2022-01-08 12:30 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.