diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-08-09 16:03:20 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-08-14 08:31:01 +0900 |
commit | cdca8b5ceffd12ff702903e3369f3cafff2787ae (patch) | |
tree | 40c8e67123155bae0388ae5b63541ae71d7f362b | |
parent | 411bf84633c6a88fa1d08b5238d74b55910cffd1 (diff) |
cli: fix ParseExtendedCommunities() to correctly parse action 'accept'
close #1049
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
-rw-r--r-- | gobgp/cmd/global.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gobgp/cmd/global.go b/gobgp/cmd/global.go index a02de92a..c9bc97d6 100644 --- a/gobgp/cmd/global.go +++ b/gobgp/cmd/global.go @@ -254,9 +254,6 @@ func ParseExtendedCommunities(input string) ([]bgp.ExtendedCommunityInterface, e for i, idx := range idxs { var a []string f := ExtCommParserMap[idx.t] - if f == nil { - continue - } if i < len(idxs)-1 { a = args[:idxs[i+1].i-idx.i] args = args[(idxs[i+1].i - idx.i):] @@ -264,6 +261,9 @@ func ParseExtendedCommunities(input string) ([]bgp.ExtendedCommunityInterface, e a = args args = nil } + if f == nil { + continue + } ext, err := f(a) if err != nil { return nil, err |