Skip to content
Snippets Groups Projects
Commit a3e1a727 authored by Joe Hershberger's avatar Joe Hershberger
Browse files

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: default avatarJoe Hershberger <joe.hershberger@ni.com>
parent e7111015
No related branches found
No related tags found
No related merge requests found
...@@ -153,12 +153,16 @@ static void netboot_update_env (void) ...@@ -153,12 +153,16 @@ static void netboot_update_env (void)
ip_to_string (NetOurIP, tmp); ip_to_string (NetOurIP, tmp);
setenv ("ipaddr", 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) { if (NetServerIP) {
ip_to_string (NetServerIP, tmp); ip_to_string (NetServerIP, tmp);
setenv ("serverip", tmp); setenv ("serverip", tmp);
} }
#endif
if (NetOurDNSIP) { if (NetOurDNSIP) {
ip_to_string (NetOurDNSIP, tmp); ip_to_string (NetOurDNSIP, tmp);
setenv ("dnsip", tmp); setenv ("dnsip", tmp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment