diff options
Diffstat (limited to 'policy')
-rw-r--r-- | policy/policy.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/policy/policy.go b/policy/policy.go index 2a90f5c6..afe2f1a8 100644 --- a/policy/policy.go +++ b/policy/policy.go @@ -922,7 +922,7 @@ func getECommunityElem(gAdmin string) (bool, bgp.ExtendedCommunityAttrType, inte return false, bgp.ExtendedCommunityAttrType(0xFF), nil } -func (c *ExtCommunityCondition) checkMembers(eCommunities []interface{}, checkAll bool) bool { +func (c *ExtCommunityCondition) checkMembers(eCommunities []bgp.ExtendedCommunityInterface, checkAll bool) bool { result := false if checkAll { @@ -960,8 +960,7 @@ func (c *ExtCommunityCondition) checkMembers(eCommunities []interface{}, checkAl matched := false matchStr := "" for _, member := range c.ExtCommunityList { - for _, eCommunity := range eCommunities { - ec := eCommunity.(bgp.ExtendedCommunityInterface) + for _, ec := range eCommunities { t, st := ec.GetTypes() if member.isRegExp { ecString := fmt.Sprintf("%s:%s", makeTypeSubStr(st), ec.String()) |