提交 a3e1a727 编写于 作者: J Joe Hershberger

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: NJoe Hershberger <joe.hershberger@ni.com>
上级 e7111015
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册