aboutsummaryrefslogtreecommitdiff
path: root/net/bootp.c
diff options
context:
space:
mode:
authorCharles Hardin2024-04-12 13:45:33 -0700
committerTom Rini2024-04-18 16:37:14 -0600
commit8ab388bfdbcf1490c8c40480ef187a025b55c553 (patch)
tree2442b7d3ce24f9c6609b2940c6c4eb643f00d311 /net/bootp.c
parent024c95392d5ab5414e455e6f92e06dd063296d77 (diff)
net: add support to parse the NIS domain for the dhcp options
There is code in the bootp parsing for NIS domain and add the same support for the dhcp options as well. This allows the same usage of the data when the dhcp command is used in the boot command. Signed-off-by: Charles Hardin <ckhardin@gmail.com>
Diffstat (limited to 'net/bootp.c')
-rw-r--r--net/bootp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/bootp.c b/net/bootp.c
index 68002909634..c15472f5d37 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -883,6 +883,14 @@ static void dhcp_process_options(uchar *popt, uchar *end)
break;
case 28: /* Ignore Broadcast Address Option */
break;
+ case 40: /* NIS Domain name */
+ if (net_nis_domain[0] == 0) {
+ size = truncate_sz("NIS Domain Name",
+ sizeof(net_nis_domain), size);
+ memcpy(&net_nis_domain, popt + 2, size);
+ net_nis_domain[size] = 0;
+ }
+ break;
#if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER)
case 42: /* NTP server IP */
net_copy_ip(&net_ntp_server, (popt + 2));