diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-12-12 17:36:54 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-12-12 17:36:54 +0100 |
commit | 532116e7e33d80a79e176f043defffbfc2b8d06e (patch) | |
tree | 26927a8dc3e34f992d4cc0ececdc297a7883cc47 /proto | |
parent | 6b5ad2066a8002bb0fd1dde58e6c0f1e43613aee (diff) |
BGP: Do not prepend ASN in export from non-RS EBGP to RS EBGP
When route is exported to regular EBGP, local ASN should be prepended to
AS_PATH. When route is propagated by route server (between RS-marked
EBGP peers), it should not change AS_PATH. Question is what to do in
other cases (from non-RS EBGP, IBGP, or locally originated to RS EBGP).
In 1.6.x, we did not prepend ASN in non-RS EBGP or IBGP to RS EBGP, but
we prepended in local to RS EBGP.
In 2.0.x, we changed that so only RS-EBGP to RS-EBGP is not prepended.
We received some negative responses (thanks to heisenbug and Alexander
Zubkov), we decided to change it back. One reason is that it is simple
to modify the AS_PATH by filters, but not possible to un-modify
changes done by BGP itself. Also, as 1.6.x behavior was not really
consistent, the final behavior is that ASN is never prepended when
exported to RS EBGP, like to IBGP.
Note that i do not express an opinion about whether such configurations
are even reasonable.
Diffstat (limited to 'proto')
-rw-r--r-- | proto/bgp/attrs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 572adff8..868caca5 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -1454,8 +1454,7 @@ bgp_update_attrs(struct bgp_proto *p, struct bgp_channel *c, rte *e, ea_list *at ad = as_path_strip_confed(pool, ad); /* AS_PATH attribute - keep or prepend ASN */ - if (p->is_internal || - (p->rs_client && src && src->rs_client)) + if (p->is_internal || p->rs_client) { /* IBGP or route server -> just ensure there is one */ if (!a) |