In portable some features are disabled and requests by bgpctl should result in an error that is reasonable.
For example bgpctl show fib returns "permission denied" in kroute-disabled.c which is not great. So lets have an explicit error for unavailable features in -portable. -- :wq Claudio Index: bgpd.h =================================================================== RCS file: /cvs/src/usr.sbin/bgpd/bgpd.h,v retrieving revision 1.476 diff -u -p -r1.476 bgpd.h --- bgpd.h 16 Aug 2023 08:26:35 -0000 1.476 +++ bgpd.h 30 Aug 2023 07:35:34 -0000 @@ -691,7 +691,8 @@ enum ctl_results { CTL_RES_NOMEM, CTL_RES_BADPEER, CTL_RES_BADSTATE, - CTL_RES_NOSUCHRIB + CTL_RES_NOSUCHRIB, + CTL_RES_OPNOTSUPP, }; /* needed for session.h parse prototype */ @@ -1709,7 +1710,8 @@ static const char * const ctl_res_strerr "out of memory", "not a cloned peer", "peer still active, down peer first", - "no such RIB" + "no such RIB", + "operation not supported", }; static const char * const timernames[] = {