From: Charles Hardin <ckhardin@gmail.com>
To: u-boot@lists.denx.de
Cc: joe.hershberger@ni.com, rfried.dev@gmail.com, ckhardin@gmail.com
Subject: [PATCH 1/1] net: add support to parse the NIS domain for the dhcp options
Date: Mon, 1 Apr 2024 12:13:19 -0700 [thread overview]
Message-ID: <20240401191319.62652-1-ckhardin@gmail.com> (raw)
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>
---
net/bootp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/net/bootp.c b/net/bootp.c
index 6800290963..046caf3685 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, ext + 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));
--
2.39.3 (Apple Git-146)
next reply other threads:[~2024-04-01 20:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-01 19:13 Charles Hardin [this message]
2024-04-12 19:58 ` [PATCH 1/1] net: add support to parse the NIS domain for the dhcp options Tom Rini
2024-04-12 20:45 ` [PATCHv2] " Charles Hardin
2024-04-19 1:57 ` Tom Rini
2024-04-12 21:59 ` [PATCH 1/1] " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240401191319.62652-1-ckhardin@gmail.com \
--to=ckhardin@gmail.com \
--cc=joe.hershberger@ni.com \
--cc=rfried.dev@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox