bird2: Symbolic constants for bgp_origin don't work

Ondrej Zajicek santiago at crfreenet.org
Tue Feb 13 19:15:45 CET 2018


On Mon, Feb 12, 2018 at 03:54:09AM +0100, Luis Ressel wrote:
> Hello,
> 
> According to the docs, the bgp_origin route attribute can have the
> values ORIGIN_IGP, ORIGIN_EGP and ORIGIN_INCOMPLETE. However, filter
> conditions such as "bgp_origin = ORIGIN_IGP" don't appear to match
> anything. (They don't throw an error either, so bird apparently
> recognizes the constants.)
> 
> "bgp_origin = 0" (or 1, 2) works, though.

Hello

You are right. Enum values for bgp_origin and ra_preference are not
handled properly. For 1.6.3 and older, bgp_origin is essentially an
integer attribute, using values 0, 1, and 2.

For 2.0.0, we have some hack that allows to use ORIGIN_* constants to set
the attribute, but for testing it is returns numbers instead of enum
constants.

I think we should fix it properly for 2.0.x and document the old behavior
for 1.6.x as there are probably users that use the integer workaround
and proper fix would break that setting.

-- 
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