public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Stas Sergeev <stsp2@yandex.ru>
Cc: passt-dev@passt.top
Subject: Re: [PATCH] dhcp: put option 53 at the beginning
Date: Thu, 5 Oct 2023 08:19:17 +0200	[thread overview]
Message-ID: <20231005081917.11314f07@elisabeth> (raw)
In-Reply-To: <20231003080122.2985329-1-stsp2@yandex.ru>

On Tue,  3 Oct 2023 13:01:22 +0500
Stas Sergeev <stsp2@yandex.ru> wrote:

> ... unless it is listed in 55.
> Many clients expect option 53 at the beginning.
> mTCP has this code:
>   if ( resp->options[0] != 53 ) {
>     TRACE_WARN(( "Dhcp: first option was not a Dhcp msg type\n" ));
>     return;
>   }
> 
> wattcp32 has this:
> static int DHCP_is_ack (void)
> {
>   const BYTE *opt = (const BYTE*) &dhcp_in.dh_opt[4];
> 
>   return (opt[0] == DHCP_OPT_MSG_TYPE && opt[1] == 1 && opt[2] == DHCP_ACK);
> }
> static int DHCP_is_nack (void)
> {
>   const BYTE *opt = (const BYTE*) &dhcp_in.dh_opt[4];
> 
>   return (opt[0] == DHCP_OPT_MSG_TYPE && opt[1] == 1 && opt[2] == DHCP_NAK);
> }
> 
> Link: https://bugs.passt.top/show_bug.cgi?id=77
> Signed-off-by: Stas Sergeev <stsp2@yandex.ru>

Applied, thanks!

-- 
Stefano


      reply	other threads:[~2023-10-05  6:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03  8:01 [PATCH] dhcp: put option 53 at the beginning Stas Sergeev
2023-10-05  6:19 ` 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=20231005081917.11314f07@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).