[PATCH 1/8] net: dhcp: reset env variable before do a dhcp request
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Fri Mar 30 00:31:46 EDT 2012
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
net/dhcp.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/dhcp.c b/net/dhcp.c
index 53eed6c..1ba4def 100644
--- a/net/dhcp.c
+++ b/net/dhcp.c
@@ -453,6 +453,12 @@ static int do_dhcp(int argc, char *argv[])
int ret, opt;
char *vendor_id = (char*)getenv("dhcp_vendor_id");
+ setenv("bootfile","");
+ setenv("nameserver","");
+ setenv("hostname","");
+ setenv("domainname","");
+ setenv("rootpath","");
+
while((opt = getopt(argc, argv, "v:")) > 0) {
switch(opt) {
case 'v':
--
1.7.9.1
More information about the barebox
mailing list