route withdrawals are not sent upon protocol removal
Ondrej Zajicek
santiago at crfreenet.org
Wed Jun 6 16:39:43 CEST 2018
On Wed, Jun 06, 2018 at 03:17:37PM +0100, Thomás S. Bregolin wrote:
> On Wed, Jun 6, 2018 at 2:25 PM, Ondrej Zajicek <santiago at crfreenet.org>
> wrote:
>
> > On Wed, Jun 06, 2018 at 01:33:53PM +0100, Thomás S. Bregolin wrote:
> > [...]
> > > I've attached a modified version of the test-withdraw script showing the
> > > issue. It seems my problem is related to the "start delay time" option.
> > > When I set it to 1, sometimes the withdrawal is sent, and sometimes it
> > > isn't. However, when it *isn't* sent, it is *never* sent, no matter how
> > > long I wait. The problem is solved by setting the timeout to a higher
> > > value, or using the default 5 seconds.
> >
> > Hello
> >
> > Note that in the modified version no protocols are removed, both testproto
> > and testproto2 are still configured and running. Just the BGP export
> > filter was changed, and because 'configure soft' was used, then it was
> > not reloaded. That is expected.
> >
> > But it is likely that if both changes happen simultaneously, i.e. a
> > static protocol is removed and a BGP export filter is changed to no
> > longer allow routes from that protocol, then withdraws are not sent. This
> > is likely a bug, could be avoided by not doing both protocol removal and
> > export filter change at the same time.
> >
>
> Oh, interesting! Indeed, if I remove just the filter or both the filter and
> route, the withdrawals are not sent. However, if I remove only the route,
> the withdrawal is sent.
If you remove just the filter, then withdrawal is not sent, because you
used 'configure soft' and not 'configure'. That is expected and will be
fixed when you use 'reload' command.
The problem is only when a route is removed during such interval, as then
during 'reload' BIRD no longer knows about it and therefore does not send
a withdrawal.
Also note that when both sides has BGP with 'enhanced route refresh', the
issue should not be problem. As in such case 'reload out' is delimited by
Begin-RR and End-RR messages and received should remove all routes that
were not received during that interval.
As BIRD has this feature for a long time, not sure why it does not happen
in your case. Do you have something different than BIRD on the other side?
What is reported in 'Neighbor caps' in 'show protocols all' for BGP session?
> Indeed, as you say, it sounds like a bug. For two reasons:
>
> - BIRD should never remove a protocol without sending a withdrawal (unless
> that is wanted as a feature or configuration option);
> - There is no reason why removing the filter at the same time as the route
> should change the behaviour;
We could probably fix that for a cost of sending some spurious withdrawals
in some cases.
--
Elen sila lumenn' omentielvo
Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
More information about the Bird-users
mailing list