Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: bgpd: rde ibuf parser part 4
To:
tech@openbsd.org
Date:
Thu, 25 Jan 2024 10:29:31 +0100

Download raw body.

Thread
On Wed, Jan 24, 2024 at 04:52:20PM +0100, Claudio Jeker wrote:
> Convert all other attributes in rde_attr_parse() apart from ATTR_ASPATH
> and ATTR_AS4_PATH to use the ibuf API.
> 
> I shuffled the checks a bit and always do CHECK_FLAGS() first then the
> size check. I did extra size check to be sure that there is no extra data
> in the attribute.

The UPD_READ() macro can be garbage collected once this is in. Other
than that I can't spot anything wrong with the diff.

ok tb

(With CBS we usually ensure absence of trailing data by checking that
the relevant buffer was fully consumed at the end. With the current
logic this is obviously trickier than what you did here.)