Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: bgpd: split session.c in two
To:
tech@openbsd.org
Date:
Wed, 26 Feb 2025 16:44:45 +0100

Download raw body.

Thread
On Wed, Feb 26, 2025 at 02:30:18PM +0100, Claudio Jeker wrote:
> On Tue, Feb 25, 2025 at 03:31:29PM +0100, Claudio Jeker wrote:
> > session.c is too big and I would like to reuse code for another project.
> > So I decided to split out the BGP protocol bits into session_bgp.c
> > and session.c holds the rest of the code (especially the imsg bits).
> > 
> > Sorry the diff is huge and hard to review.
> 
> This is an updated diff since I committed some smaller bits from this.

It's still noisier than it needs to be, but now the stuff added on top
the split are rather trivial, so I'm ok with this going in as it is.

Just one thing:

> +int
> +session_graceful_flush(struct peer *p, uint8_t aid, const char *why)
> +{
> +	log_peer_warnx(&p->conf, "graceful restart of %s, %s, flushing",
> +	    aid2str(aid), why);
> +	if (imsg_rde(IMSG_SESSION_FLUSH, p->conf.id, &aid, sizeof(aid)) == -1)
> +		return -1;
> +	return 0;
> +}	

Could you please zap the trailing tab after } here?