summaryrefslogtreecommitdiffhomepage
path: root/table
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-06-13 20:41:40 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-06-13 20:41:40 +0900
commitb8f83f8edebb1d53e2b1ebbb6cb8350f6f94a56d (patch)
tree7ffcf848c45c7ecd11747f5bab2df58cb5697c4d /table
parentc8d69a3906dc9a6ea9a7257805fbb7682362c367 (diff)
drop unknown optional non-transitive attributes
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table')
-rw-r--r--table/path.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/table/path.go b/table/path.go
index d4946e8d..1d0765d4 100644
--- a/table/path.go
+++ b/table/path.go
@@ -160,6 +160,13 @@ func cloneAsPath(asAttr *bgp.PathAttributeAsPath) *bgp.PathAttributeAsPath {
}
func (path *Path) UpdatePathAttrs(global *config.Global, peer *config.Neighbor) {
+ for _, a := range path.GetPathAttrs() {
+ if _, y := bgp.PathAttrFlags[a.GetType()]; !y {
+ if a.GetFlags()&bgp.BGP_ATTR_FLAG_TRANSITIVE == 0 {
+ path.delPathAttr(a.GetType())
+ }
+ }
+ }
if peer.RouteServer.Config.RouteServerClient {
return