On Wed, Jul 27, 2022 at 06:36:22PM +0200, Theo Buehler wrote: > On Wed, Jul 27, 2022 at 05:41:11PM +0200, Claudio Jeker wrote: > > My last try was not successful because kr_tofull() did not return RTP_MINE > > and so some checks for RTP_MINE instead of F_KERNEL did not work. > > > > This diff does two things. It replaces the F_KERNEL checks with !F_BGPD > > checks. F_KERNEL and F_BGPD are mutual exclusive. > > On top of that keep kr->priority at RTP_MINE and introduce kr_priority() > > which translates the priority back to a real prio number. > > kr_priority() is mainly used for the bgpctl imsg commands. > > Why do you say mainly? I can't see it used for anything else.
The other place this could be used is in send_rtmsg(). There we just hardcode the prio to the configured priority of the daemon. It would be possible to use kr_priority() there too. > > In dispatch_rtmsg_addr() do the inverse and translate back to RTP_MINE > > also force the right flags and priority in kr_change and kr_delete. > > This diff reads fine to me and I agree that it fixes the problem the > previous version had. > > ok tb > -- :wq Claudio
