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=YwUbr1zS; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 197B65A061A for ; Tue, 26 Nov 2024 02:16:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1732583774; bh=mID1rwd5ZOVxN2bYjuQ8rYiID0rqhDKh8+9W2la0aQw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YwUbr1zS3WkWo89V+0NudDN+oqbfXkAZZKWDs/mHrz2UdcTDdZ9/sl988fHbG139q +6nstSeEfyOAQu4goSJHCYBMvvLu4Y+YDX5oeYDZZhuLGza8llnLLQ5pjTT2eHW6tM OxZbc+17NieBGPGqU3q/+Id+IPsmuBE+OEc+V4uh8RFuq7FY7cdVhT7oGFa3vO93cu FzyV3HcNmKGBcgrUevcBMOOxyfLTvB4F2on8Cb6hoS1HYdWAXIOPzPV0/TUnFDSzw6 eSedPrK62/nkByJwuFXgJbhrM8TgOfN7X12fH7HHoy/dJSsf+qdZZgAwThE5Rp4XJ0 Gyw1WxnBfVN9Q== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Xy4Qk6yqVz4xdy; Tue, 26 Nov 2024 12:16:14 +1100 (AEDT) Date: Tue, 26 Nov 2024 12:15:36 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v3 2/3] dhcp: Introduce support for Rapid Commit (option 80, RFC 4039) Message-ID: References: <20241125152812.369553-1-sbrivio@redhat.com> <20241125152812.369553-3-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="YxOTuhgmABoz5dAR" Content-Disposition: inline In-Reply-To: <20241125152812.369553-3-sbrivio@redhat.com> Message-ID-Hash: CN4DXR2FHL4LOCCXFDFVR3BHVZMZG6Y5 X-Message-ID-Hash: CN4DXR2FHL4LOCCXFDFVR3BHVZMZG6Y5 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: --YxOTuhgmABoz5dAR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 25, 2024 at 04:28:11PM +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 | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) >=20 > diff --git a/dhcp.c b/dhcp.c > index 57f69a5..90bb534 100644 > --- a/dhcp.c > +++ b/dhcp.c > @@ -342,9 +342,16 @@ int dhcp(const struct ctx *c, const struct pool *p) > opt_off +=3D *olen + 2; > } > =20 > + opts[80].slen =3D -1; > 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", /* DHCP needs a valid message type */ > (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 --YxOTuhgmABoz5dAR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmdFITcACgkQzQJF27ox 2Gd/vQ//bWuAfsAZu3v7y2BkU/XHNmI4ms8ZMokBYATbc8owogVxLPhGcFx8GgYF fvfu2GJm0McgCUZqvGkbWPgsCTdoNXR5K5e4cJFm4s9Dqtk2U9NsMOIShGL1B7d5 8uSKXy/GoQJoBn0kUmS9T/tFpzs/cZohfY46yHCmPolR20mmn6AUwKh3jpoSvgSk fA/uhZW2vbGQAGyHlhbAK93KH2Hf/KhXOElNF1/YoppqkRBtLcOgXgOTMK7pN7+1 07clwcS+3v+iYW+xdz0NJ/nKrClSk+yB4BrZymFmLaROcwAGN+lrNZaCkuSChl2A CIL0Fx7jf+8T8WupPG63KftP9GEu8b5xWEBbmVNcTA1LXPpu9A4nDwVWc+ErHhN3 iv68AFYvD+7q/w8hmEpbDTuo6KIddT8m565Lug+jO+LtRRidIZq80v9Lu8ou0qbX eMQcimM8rHQNhaOGQ313jSlfDSdwm5tWnRubTcTcbTtyOuK/SI8nfH4rrKOTLlnV 7Z6Es1kVtibc24qZwvEzQ1zlybSiT9nNUcie774v2XMKs7FP0e+F4XsO5vbDIVVr 17iP56hGQsoXBvr6koWDBProYUkfk4wstu4VaqVJPTkOaHXoVIevSt5ab3Jpgalg XCMmqHSRXOlPl1nMYr7cblIU9ZIggDAfZdJaWACdgHmBXyvT0C8= =vwTv -----END PGP SIGNATURE----- --YxOTuhgmABoz5dAR--