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>
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 @@
 		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 @@
 	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;