net: bootp: Make root path (option 17) length configurable

to adjust the root path length.
Eg to 256 from Linux Kernel

Signed-off-by: Andre Kalb <andre.kalb@sma.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
[trini: Guard extern so that !CONFIG_NET platforms will build]
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/net/Kconfig b/net/Kconfig
index 564ea8b..52e2618 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -168,6 +168,12 @@
 	  variable, not the BOOTP server. This affects the operation of both
 	  bootp and tftp.
 
+config BOOTP_MAX_ROOT_PATH_LEN
+	int "Option 17 root path length"
+	default 64
+	help
+	  Select maximal length of option 17 root path.
+
 endif   # if NET
 
 config SYS_RX_ETH_BUFFER
diff --git a/net/bootp.c b/net/bootp.c
index a544bfc..b260d5d 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -59,7 +59,7 @@
 ulong		bootp_timeout;
 char net_nis_domain[32] = {0,}; /* Our NIS domain */
 char net_hostname[32] = {0,}; /* Our hostname */
-char net_root_path[64] = {0,}; /* Our bootpath */
+char net_root_path[CONFIG_BOOTP_MAX_ROOT_PATH_LEN] = {0,}; /* Our bootpath */
 
 static ulong time_taken_max;