Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: bgpd: start rework the rde_filter code
To:
tech@openbsd.org
Date:
Tue, 10 Feb 2026 17:18:43 +0100

Download raw body.

Thread
On Tue, Feb 10, 2026 at 04:12:24PM +0100, Claudio Jeker wrote:
> After implementing rde_filterset which improved rde_attr_set() a fair bit
> it is time to tackle filter_rules.
> 
> Right now I'm just looking at the out filters (which are already per
> peer). So as a first step I decoupled these filters from the in filters by
> adding a new simplified rde_filter_out() function.
> Also rde_filter_match() is now just using the filter_match object and not
> the full rule. For that the peer.ebgp and peer.ibgp checks had to be moved
> up into rde_filter() which is a bit strange because of skip steps.
> Long term I will also redo the in filters but those will follow later and
> then skip steps will go away.
> 
> So this is just a big shuffle that should have no visible effect.

The diff reads fine.

ok tb

Since you say the skip steps will go away, I would suggest that you kill
RDE_FILTER_TEST_ATTRIB() as well. I would find

	if (condition) {
		f = next;
		continue;
	}

easier to read and I think it would even use fewer lines than now.