summaryrefslogtreecommitdiff
path: root/cmd/Kconfig
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2018-06-15 10:29:28 +0200
committerJoe Hershberger <joe.hershberger@ni.com>2018-07-02 14:14:21 -0500
commitbdce340cc6a17efe1d980eda378c3b1984059362 (patch)
tree34d8310fec5dde2be52f3776932a23a21a93af4f /cmd/Kconfig
parent449312c1c0c686ad28c51e6429d8bbdd13812b10 (diff)
downloadu-boot-bdce340cc6a17efe1d980eda378c3b1984059362.tar.gz
net: Add option to prefer bootp/dhcp serverip
Currently we can choose between 2 different types of behavior for the serverip variable: 1) Always overwrite it with the DHCP server IP address (default) 2) Ignore what the DHCP server says (CONFIG_BOOTP_SERVERIP) This patch adds a 3rd option: 3) Use serverip from DHCP if no serverip is given (CONFIG_BOOTP_PREFER_SERVERIP) With this new option, we can have the default case that a boot file gets loaded from the DHCP provided TFTP server work while allowing users to specify their own serverip variable to explicitly use a different tftp server. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'cmd/Kconfig')
-rw-r--r--cmd/Kconfig10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index bbf9fc9113..aec209006d 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1121,6 +1121,16 @@ config BOOTP_HOSTNAME
help
The name may or may not be qualified with the local domain name.
+config BOOTP_PREFER_SERVERIP
+ bool "serverip variable takes precedent over DHCP server IP."
+ depends on CMD_BOOTP
+ help
+ By default a BOOTP/DHCP reply will overwrite the 'serverip' variable.
+
+ With this option enabled, the 'serverip' variable in the environment
+ takes precedence over DHCP server IP and will only be set by the DHCP
+ server if not already set in the environment.
+
config BOOTP_SUBNETMASK
bool "Request & store 'netmask' from BOOTP/DHCP server"
default y