summaryrefslogtreecommitdiff
path: root/common/cmd_net.c
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2012-05-23 07:59:17 +0000
committerJoe Hershberger <joe.hershberger@ni.com>2012-05-23 17:53:04 -0500
commita3e1a727fe8a8b0294fe3ffbc8dcd2f14a4e5a4e (patch)
treef854e4189b79c7904912a104e266880751423966 /common/cmd_net.c
parente71110158124009c043eac704db9d442db43b36d (diff)
net: Don't write the "serverip" env var if configured not to
Before this patch, bootp would not overwrite the value, but the value was still clobbered in the env Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'common/cmd_net.c')
-rw-r--r--common/cmd_net.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/cmd_net.c b/common/cmd_net.c
index 65f32bceef4..2f660566f72 100644
--- a/common/cmd_net.c
+++ b/common/cmd_net.c
@@ -153,12 +153,16 @@ static void netboot_update_env (void)
ip_to_string (NetOurIP, tmp);
setenv ("ipaddr", tmp);
}
-
+#if !defined(CONFIG_BOOTP_SERVERIP)
+ /*
+ * Only attempt to change serverip if net/bootp.c:BootpCopyNetParams()
+ * could have set it
+ */
if (NetServerIP) {
ip_to_string (NetServerIP, tmp);
setenv ("serverip", tmp);
}
-
+#endif
if (NetOurDNSIP) {
ip_to_string (NetOurDNSIP, tmp);
setenv ("dnsip", tmp);