Allowing multiple instances of kernel protocol to use same table

Ondrej Zajicek santiago at crfreenet.org
Tue Aug 19 00:28:59 CEST 2014


On Mon, Aug 18, 2014 at 02:00:16PM +0200, Alexander Demenshin wrote:
> Hi,
> 
> Is there any specific reason why each instance of kernel protocol must use
> unique table?

Yes, because BIRD keeps some bits of data related to export of routes to
the kernel table directly with routes in routing tables (flags KRF_INSTALLED,
KRF_SYNC_ERROR, see krt_notify() and krt_replace_rte()). If you just force
multiple tables, these bits for different kernel protocols would be mixed.

E.g.: You have two kernel protocols K1 and K2 and route R whose export to
K1 is accepted but to K2 is filtered. You get:

1) R appeared
2) R is exported to K1, KRF_INSTALLED flag is set for R
3) R is filtered to K2, KRF_INSTALLED flag is unset for R

4) R is removed
5) R withdraw is exported to K1, but because KRF_INSTALLED is not set,
K1 do not try to remove R from the kernel and it stays here.

So the modification would most likely break proper synchronization when
multiple tables are used. Although periodic scans of routing tables may
fix it, i wouldn't rely on that.

-- 
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."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20140819/234b8b73/attachment-0001.asc>


More information about the Bird-users mailing list