[PATCH RFC v2] Preserve BGP attributes from non-BGP protocols

Ondrej Zajicek santiago at crfreenet.org
Wed May 22 12:36:07 CEST 2013


On Fri, May 17, 2013 at 04:31:07PM +0200, Matthias Schiffer wrote:
> There is no reason to overwrite attributes like AS path, next hop, etc. when the
> route source is not BGP. Preserving them has several advantages:
> 
>  * no attributes are lost by using opaque pipes
>  * BGP attributes can by pre-populated in other protocols' import filters

I agree with the point that BGP should not overwrite BGP attributes from
foreign routes exported to it. But the current behavior is both
established and consistent with other protocols (like OSPF, where the
situation is ever worse), so NACK for current minor releases. I plan to
do some major changes to attribute behavior to make it more consistent
and such change will be a part of it.

There is also a question of how BGP attribute on non-BGP route should be
interpreted by BGP protocol - either like BGP routes, or like non-BGP
routes with the attribute assigned by BGP export filter. I would prefer
the second behavior - the difference is in implicit modifications of
current attributes (like bgp_next_hop), in the first variant it would be
modified as it is from BGP route, in the second variant it is not
modified as all (because it is set as a local policy). Therefore if you,
e.g., originate a static route and export it to a BGP protocol, it
wouldn't make a difference if you modify BGP attributes in the import
filter of the static protocol or in the export filter of the BGP protocol.

BTW, do you need this because you use opaque pipes? One of my long-term
plans is to remove support for opaque pipes and replace them with
transparent pipes (i.e. pipes retaining type and attributes) configured
to propagate just the best route. Could this 

> As a side effect of moving code from bgp_create_attrs() to bgp_update_attrs(),
> the BGP protocol now uses the same logic to determine if the "gw" attribute
> should be used as next hop for routes from BGP sources as for those from other
> sources. Previously, the "gw" attribute was never for routes from BGP.

Well, as a side effect the code for NEXT_HOP attribute modification
becames incomprehensible (altought the original code is also horrible
from this point of view).

BTW, is there any non-broken case in which 'gw' attribute is used for
routes from BGP in your code? I cannot find any.

-- 
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: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20130522/7cd5d2f2/attachment-0001.asc>


More information about the Bird-users mailing list