mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
cli: fix ParseExtendedCommunities() to correctly parse action 'accept'
close #1049 Signed-off-by: ISHIDA Wataru <[email protected]>
This commit is contained in:
committed by
FUJITA Tomonori
parent
411bf84633
commit
cdca8b5cef
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user