From: Stefano Brivio <sbrivio@redhat.com>
To: Stas Sergeev <stsp2@yandex.ru>
Cc: passt-dev@passt.top
Subject: Re: [PATCH] dhcp: support BOOTP clients
Date: Thu, 7 Sep 2023 17:45:26 +0200 [thread overview]
Message-ID: <20230907174526.7c4a1e5b@elisabeth> (raw)
In-Reply-To: <20230829091406.562224-1-stsp2@yandex.ru>
On Tue, 29 Aug 2023 14:14:06 +0500
Stas Sergeev <stsp2@yandex.ru> wrote:
> BOOTP clients do not use tagged messages for requests.
> As such, any message without the DHCP option 53, should be
> considered a BOOTP request.
>
> Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
> ---
> dhcp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/dhcp.c b/dhcp.c
> index d04648c..c1ac95e 100644
> --- a/dhcp.c
> +++ b/dhcp.c
> @@ -323,8 +323,8 @@ int dhcp(const struct ctx *c, const struct pool *p)
> if (opts[53].c[0] == DHCPDISCOVER) {
> info("DHCP: offer to discover");
> opts[53].s[0] = DHCPOFFER;
> - } else if (opts[53].c[0] == DHCPREQUEST) {
> - info("DHCP: ack to request");
> + } else if (opts[53].c[0] == DHCPREQUEST || !opts[53].clen) {
> + info("%s: ack to request", opts[53].clen ? "DHCP" : "BOOTP");
> opts[53].s[0] = DHCPACK;
> } else {
> return -1;
Also applied.
--
Stefano
prev parent reply other threads:[~2023-09-07 15:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 9:14 [PATCH] dhcp: support BOOTP clients Stas Sergeev
2023-09-07 15:45 ` Stefano Brivio [this message]
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=20230907174526.7c4a1e5b@elisabeth \
--to=sbrivio@redhat.com \
--cc=passt-dev@passt.top \
--cc=stsp2@yandex.ru \
/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.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).