diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-07-26 23:32:50 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-07-26 23:32:50 +0900 |
commit | e7b9739c9f8600ac57c1ddb56cbdf3c62b4c1692 (patch) | |
tree | ffed978cb368c166094d1bfd9037f72a4901875e /table | |
parent | c88aaff9b5ebc74810af21222b4671f36a593682 (diff) |
table: don't send OriginaterID or ClusterList attributes to non rr clients
A certain bgp implementation crushes when receiving them.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table')
-rw-r--r-- | table/path.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/table/path.go b/table/path.go index 6b7146a9..07702fc4 100644 --- a/table/path.go +++ b/table/path.go @@ -230,6 +230,14 @@ func UpdatePathAttrs(global *config.Global, peer *config.Neighbor, info *PeerInf if a.GetFlags()&bgp.BGP_ATTR_FLAG_TRANSITIVE == 0 { path.delPathAttr(a.GetType()) } + } else { + switch a.GetType() { + case bgp.BGP_ATTR_TYPE_CLUSTER_LIST, bgp.BGP_ATTR_TYPE_ORIGINATOR_ID: + if !(peer.State.PeerType == config.PEER_TYPE_INTERNAL && peer.RouteReflector.Config.RouteReflectorClient) { + // send these attributes to only rr clients + path.delPathAttr(a.GetType()) + } + } } } |