summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2016-12-15 13:05:56 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-12-15 13:05:56 +0900
commit87e1dd9ea40f4f59ad53867b3c08343368139171 (patch)
treee20475dee5fcb7d9359820958531937816641cd5
parentae496021e06452f92da8738671112597374775c1 (diff)
policy: avoid crash when getting ext-community
-rw-r--r--table/policy.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/table/policy.go b/table/policy.go
index 72313007..7e3a2246 100644
--- a/table/policy.go
+++ b/table/policy.go
@@ -1100,6 +1100,16 @@ func NewExtCommunitySet(c config.ExtCommunitySet) (*ExtCommunitySet, error) {
}, nil
}
+func (s *ExtCommunitySet) Append(arg DefinedSet) error {
+ err := s.regExpSet.Append(arg)
+ if err != nil {
+ return err
+ }
+ sList := arg.(*ExtCommunitySet).subtypeList
+ s.subtypeList = append(s.subtypeList, sList...)
+ return nil
+}
+
type LargeCommunitySet struct {
regExpSet
}