busybox: Enable domain search list support in udhcpc
authorAlexey Brodkin <alexey.brodkin@synopsys.com>
Mon, 8 Apr 2019 11:00:10 +0000 (14:00 +0300)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 3 Aug 2019 15:49:54 +0000 (17:49 +0200)
This is useful in networks with internal resources as it allows
to use much shorter names.

E.g. instead of "server.internal.company.com" it's possible
to use just "server" if DHCP server is configured with:
---------------------------->8-----------------------
option domain-search "internal.company.com";
---------------------------->8-----------------------

This improvement consists of 2 parts:

1. Enable handling of RFC3397 so DHCP client is ready for processing
   corresponding data from DHCP server.

2. Some DHCP servers always send out search list if it is set in server's
   configuration and some servers only provide search list if client
   asks for that (sending list of options it expects to get).

   And exactly for those stubborn DHCP servers we need to add "-O search"
   to udhcp's command line via CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Ignacy Gawedzki <ignacy.gawedzki@green-communications.fr>
Cc: Peter Korsgaard <peter@korsgaard.com>
Acked-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/busybox/busybox.config

index c28718a725cef614ebc4f6a4a60042d2a92deb72..1ea810e5bef18c4aa2ef2e52ab93958c17b65ef7 100644 (file)
@@ -968,9 +968,9 @@ CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
 # CONFIG_FEATURE_UDHCP_PORT is not set
 CONFIG_UDHCP_DEBUG=0
 CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
-# CONFIG_FEATURE_UDHCP_RFC3397 is not set
+CONFIG_FEATURE_UDHCP_RFC3397=y
 CONFIG_FEATURE_UDHCP_8021Q=y
-CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
+CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n -O search"
 
 #
 # Print Utilities