diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-07-30 18:54:56 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-08-05 17:24:36 +0900 |
commit | 6b3e4a74e30130909fc6e86a9ce1d5c1b85c95c9 (patch) | |
tree | 34337f2eb9f9c4b224fca7cd8ae86b07642625aa /policy | |
parent | 2017bdc7a9452d4a66dd062016f1b68fbf4ef09b (diff) |
path: return Extendedcommunityinterface rathar than interface{}
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
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()) |