summaryrefslogtreecommitdiffhomepage
path: root/table/path.go
diff options
context:
space:
mode:
authorHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-08-19 11:39:46 +0900
committerHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-08-19 17:31:29 +0900
commitfb91965dd47045339a78f2231169a9d32be52985 (patch)
tree91e6785c25bb3d1c753352615884d529b077ff5c /table/path.go
parent34c10c943f9b581285316f529a982d69bf9d8fd5 (diff)
scenario_test: add ext-community action test
Diffstat (limited to 'table/path.go')
-rw-r--r--table/path.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/table/path.go b/table/path.go
index f4f1893b..bc982cec 100644
--- a/table/path.go
+++ b/table/path.go
@@ -524,10 +524,11 @@ func (path *Path) SetExtCommunities(values []byte, doReplace bool) {
exts = append(exts, e)
values = values[8:]
}
- _, attr := path.getPathAttr(bgp.BGP_ATTR_TYPE_EXTENDED_COMMUNITIES)
+ idx, attr := path.getPathAttr(bgp.BGP_ATTR_TYPE_EXTENDED_COMMUNITIES)
if attr != nil {
l := attr.(*bgp.PathAttributeExtendedCommunities).Value
l = append(l, exts...)
+ path.pathAttrs[idx] = bgp.NewPathAttributeExtendedCommunities(l)
} else {
path.pathAttrs = append(path.pathAttrs, bgp.NewPathAttributeExtendedCommunities(exts))
}