From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202410 header.b=HHP3fOmM; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 5405D5A061B for ; Mon, 25 Nov 2024 02:11:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1732497096; bh=GQVxJMnvQsbdJytNMWLYmQEfXciLa1H2hxnI+ibLxiE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HHP3fOmMjSgB/bBPqYsmKzRo6YyQChDvxVWI+Hxgy/QPXPEN58hmZuKEB7pQDtwer n9mfA0C7x3cgbHWxSNmne5l+jyW97Ygee2Ij//ZAl6YIj73H/Cg1gbx2X92Vu+RJwA 2Xjk0RPstZFTbquS3KTkv5j+HD5IctPeUtnZmUpQ/0pm0zbuv1QD4Ch91/2RkybrDL ILzkYzameseBIApp/hHh1/mQRmQocsj9KzTzEEhmQnfKsU3Ci+tdWMhv7rmpCYglUt G6kK/Sbczq2wpYumGAfR7A6NLrtQ2As3JIHORFWTm/PcgAc+EHWOILIKgBK1+7XAyV IIhpRre8pJHDw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4XxSMr194pz4x3J; Mon, 25 Nov 2024 12:11:36 +1100 (AEDT) Date: Mon, 25 Nov 2024 12:09:30 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 2/3] dhcp: Introduce support for Rapid Commit (option 80, RFC 4039) Message-ID: References: <20241125000423.4131458-1-sbrivio@redhat.com> <20241125000423.4131458-3-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yhaGuNcYArPyWgcQ" Content-Disposition: inline In-Reply-To: <20241125000423.4131458-3-sbrivio@redhat.com> Message-ID-Hash: TZDIMJX6MNJTBLMV66CNGGTALRCLYVZE X-Message-ID-Hash: TZDIMJX6MNJTBLMV66CNGGTALRCLYVZE X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --yhaGuNcYArPyWgcQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 25, 2024 at 01:04:22AM +0100, Stefano Brivio wrote: > I'm trying to speed up and simplify IP address acquisition in muvm. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > dhcp.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) >=20 > diff --git a/dhcp.c b/dhcp.c > index 2fe4a4d..aa0ad96 100644 > --- a/dhcp.c > +++ b/dhcp.c > @@ -342,8 +342,14 @@ int dhcp(const struct ctx *c, const struct pool *p) > } > =20 > if (opts[53].c[0] =3D=3D DHCPDISCOVER) { > - info("DHCP: offer to discover"); > - opts[53].s[0] =3D DHCPOFFER; > + if (opts[80].clen =3D=3D -1) { > + info("DHCP: offer to discover"); > + opts[53].s[0] =3D DHCPOFFER; > + } else { > + info("DHCP: ack to discover (Rapid Commit)"); > + opts[53].s[0] =3D DHCPACK; > + opts[80].slen =3D 0; > + } > } else if (opts[53].c[0] =3D=3D DHCPREQUEST || opts[53].clen <=3D 0) { > info("%s: ack to request", > (opts[53].clen <=3D 0) ? "DHCP" : "BOOTP"); --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --yhaGuNcYArPyWgcQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmdDzkkACgkQzQJF27ox 2GftCA//V9ySm7NVhHptjA3sweVVLelhPozR46krOIdkzqkWRrnBS6v8Y8uFvIo7 0rJ6t5H8GDE/eh6LeKc5fipIJdNxjsTdjrwTOtEPeo8F2jMGMkB1wI6d/Iy16mIz JhjvyC2MT/kU/lVMTY1l+KBI0gktJeIB8l+5YlmzUMA7QdVoCG7H56TPbmIOifUI 4HeHJlXjgTWI18kCMDICo593lDG2+oudFOnUmzpncpBQnD3HVOV8k+qQYeEqcPSI +Ze/i7XI/EByrRTh8W0AbavtRudCwQpdgHjZ2ZTPq88xgGeDUiRtdYO6sZv3GMdY aAPc70XxKVVQSVbBKzXWRg+a6y0UrF66pO9aW6kdRBjmEHdj64OorWlImxWSMgOG uNHFPuRCVY4JR5rD/v7r0TOkqVsGi9bm50zEekCNHZzMA5Aw94hBgyDFcWt7BE1v 0JO2T5ODV6iHTvBGtNCNXV3CFWmvJUvs6ludPxEETO2ZfGVzI86g8s5oYjGklRav 8BP3xTyqCIZRG0QeE2VMMYVtDakVNajXXuLqe8PoYLaDZ5FMcQWbTVUoKEscwFGs Y/uyRfDsewjYOF0UlkS9Aad2B9H+w/GQjQhD//klgt3in1gbJ56uGXrpClOvCaKB 10fX/C7TKyrKX92TygGKw+D5jrbRuUm48Qcuoymfphr1eihBE2I= =2qOi -----END PGP SIGNATURE----- --yhaGuNcYArPyWgcQ--