From: Theo Buehler Subject: Re: bgpd: handle rib "Adj-RIB-Out" in show commands To: tech@openbsd.org Date: Mon, 2 Dec 2024 16:45:03 +0100 On Mon, Dec 02, 2024 at 04:42:12PM +0100, Claudio Jeker wrote: > The Adj-RIB-Out unlike Adj-RIB-In does not exists in bgpd. > Because of this > bgpctl show rib table Adj-RIB-In > works but > bgpctl show rib table Adj-RIB-Out > fails. > > I think it makes sense to add this little "hack" to also support the > latter. "ok" > -- > :wq Claudio > > Index: rde.c > =================================================================== > RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v > diff -u -p -r1.642 rde.c > --- rde.c 2 Dec 2024 15:03:17 -0000 1.642 > +++ rde.c 2 Dec 2024 15:37:32 -0000 > @@ -3013,6 +3013,9 @@ rde_dump_ctx_new(struct ctl_show_rib_req > return; > } > > + if (strcmp(req->rib, "Adj-RIB-Out") == 0) > + req->flags |= F_CTL_ADJ_OUT; > + > memcpy(&ctx->req, req, sizeof(struct ctl_show_rib_request)); > ctx->req.pid = pid; > ctx->req.type = type; >