From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH v5 0/3] dhcp: Add support for Rapid Commit, broadcast replies
Date: Tue, 26 Nov 2024 08:06:14 +0100 [thread overview]
Message-ID: <20241126070617.2309047-1-sbrivio@redhat.com> (raw)
These are all changes coming from pending muvm experiments where I'm
trying to speed up and simplify the networking setup in the guest.
v5: In 2/3, keep the condition:
(opts[53].clen <= 0 || opts[53].c[0] == DHCPREQUEST)
as it was, instead of replacing || with &&
v4: In 1/3, don't swap the "BOOTP" and "DHCP" labels: we want to print
"BOOTP" if option 53 isn't there or has zero length, not the other
way around. Further, check that clen for option 53 is > 0 before
checking if it's a DHCPDISCOVER. Given that DHCPDISCOVER is 1 (not
0), this happened to already work for BOOTP, but it worked by
mistake
v3: In 1/3, set 'slen' for options we won't send to -1 in dhcp_init(),
and reset it for option 80 every time we handle a DHCP request. Add
a comment about DHCP needing a valid message type (option 53)
v2: In 3/3, add in4addr_broadcast to ip.h, instead of open-coding it in
dhcp()
Stefano Brivio (3):
dhcp: Use -1 as "missing option" length instead of 0
dhcp: Introduce support for Rapid Commit (option 80, RFC 4039)
dhcp: Honour broadcast flag (RFC 2131, 4.1)
dhcp.c | 53 +++++++++++++++++++++++++++++++++++++++++------------
ip.h | 3 +++
2 files changed, 44 insertions(+), 12 deletions(-)
--
2.43.0
next reply other threads:[~2024-11-26 7:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 7:06 Stefano Brivio [this message]
2024-11-26 7:06 ` [PATCH v5 1/3] dhcp: Use -1 as "missing option" length instead of 0 Stefano Brivio
2024-11-26 7:06 ` [PATCH v5 2/3] dhcp: Introduce support for Rapid Commit (option 80, RFC 4039) Stefano Brivio
2024-11-26 7:06 ` [PATCH v5 3/3] dhcp: Honour broadcast flag (RFC 2131, 4.1) Stefano Brivio
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=20241126070617.2309047-1-sbrivio@redhat.com \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
/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).