Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: bgpd: make session
To:
tech@openbsd.org
Date:
Tue, 11 Feb 2025 18:08:18 +0100

Download raw body.

Thread
  • Claudio Jeker:

    bgpd: make session

    • Theo Buehler:

      bgpd: make session

On Tue, Feb 11, 2025 at 05:41:04PM +0100, Claudio Jeker wrote:
> All session_xyz functions take a struct peer * as arguement with the
> exception of session_update(). Make it the same pass in struct peer and
> look it up in the imsg handler like for all other calls.

Makes sense.

> In the imsg handler add the imsg to the "no such peer" error message.
> Now this error should never show but if it does it helps to know where to
> look.

The order of checks in the IMSG_UPDATE handler isn't important, so the
slight change of behavior is fine.

ok tb

Also not terribly important: I was wondering if IMSG_CTL_SHOW_NEIGHBOR
should check that p == NULL for consistency rather than doing this in
control_imsg_relay(). This way all getpeerbyid() calls are directly
error checked.