aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvik Sil <aviksil@linux.vnet.ibm.com>2014-01-31 11:13:05 +0530
committerAlexey Kardashevskiy <aik@ozlabs.ru>2014-02-04 19:49:46 +1100
commit479f0387f9b0e0a1eff91e1ee1d7ef37e5070b83 (patch)
treee921cdf9c6e0556ce6a5b1be95c2e89ddf1feaf1
parent020220e6371d913951e06cfc4cae0f7894e93df8 (diff)
downloadSLOF-479f0387f9b0e0a1eff91e1ee1d7ef37e5070b83.zip
SLOF-479f0387f9b0e0a1eff91e1ee1d7ef37e5070b83.tar.gz
SLOF-479f0387f9b0e0a1eff91e1ee1d7ef37e5070b83.tar.bz2
Make "boot net:dhcp" boot from IPv4 only
The default network boot method "boot net" tries to boot from both IPv4 and IPv6 networks. The "boot net:ipv6" allows to boot from IPv6 network only. But there is no option for booting from IPv4 network only. This patch addresses this issue. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
-rw-r--r--clients/net-snk/app/netapps/netboot.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/clients/net-snk/app/netapps/netboot.c b/clients/net-snk/app/netapps/netboot.c
index ab96772..aa009bf 100644
--- a/clients/net-snk/app/netapps/netboot.c
+++ b/clients/net-snk/app/netapps/netboot.c
@@ -27,7 +27,7 @@
#include <of.h>
#include "netapps.h"
-#define IP_INIT_DEFAULT 2
+#define IP_INIT_DEFAULT 5
#define IP_INIT_NONE 0
#define IP_INIT_BOOTP 1
#define IP_INIT_DHCP 2
@@ -497,8 +497,8 @@ netboot(int argc, char *argv[])
rc = bootp(ret_buffer, &fn_ip, obp_tftp_args.bootp_retries);
break;
case IP_INIT_DHCP:
- printf(" Requesting IP address via DHCP: ");
- rc = dhcp(ret_buffer, &fn_ip, obp_tftp_args.bootp_retries, 0);
+ printf(" Requesting IP address via DHCPv4: ");
+ rc = dhcp(ret_buffer, &fn_ip, obp_tftp_args.bootp_retries, F_IPV4);
break;
case IP_INIT_DHCPV6_STATELESS:
printf(" Requesting information via DHCPv6: ");
@@ -508,6 +508,10 @@ netboot(int argc, char *argv[])
case IP_INIT_IPV6_MANUAL:
set_ipv6_address(&obp_tftp_args.ci6addr);
break;
+ case IP_INIT_DEFAULT:
+ printf(" Requesting IP address via DHCP: ");
+ rc = dhcp(ret_buffer, &fn_ip, obp_tftp_args.bootp_retries, 0);
+ break;
case IP_INIT_NONE:
default:
break;