diff options
author | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2016-12-15 13:05:56 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-12-15 13:05:56 +0900 |
commit | 87e1dd9ea40f4f59ad53867b3c08343368139171 (patch) | |
tree | e20475dee5fcb7d9359820958531937816641cd5 /table | |
parent | ae496021e06452f92da8738671112597374775c1 (diff) |
policy: avoid crash when getting ext-community
Diffstat (limited to 'table')
-rw-r--r-- | table/policy.go | 10 |
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 } |