aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/net.h4
-rw-r--r--net/Kconfig6
-rw-r--r--net/bootp.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/include/net.h b/include/net.h
index e3889a0bc85..c06b577808b 100644
--- a/include/net.h
+++ b/include/net.h
@@ -536,7 +536,9 @@ extern struct in_addr net_dns_server2;
#endif
extern char net_nis_domain[32]; /* Our IS domain */
extern char net_hostname[32]; /* Our hostname */
-extern char net_root_path[64]; /* Our root path */
+#ifdef CONFIG_NET
+extern char net_root_path[CONFIG_BOOTP_MAX_ROOT_PATH_LEN]; /* Our root path */
+#endif
/** END OF BOOTP EXTENTIONS **/
extern u8 net_ethaddr[ARP_HLEN]; /* Our ethernet address */
extern u8 net_server_ethaddr[ARP_HLEN]; /* Boot server enet address */
diff --git a/net/Kconfig b/net/Kconfig
index 564ea8b2d28..52e261884d1 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -168,6 +168,12 @@ config BOOTP_SERVERIP
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 a544bfcc234..b260d5d09e6 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -59,7 +59,7 @@ ulong bootp_start;
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;