summaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/table/policy.go
diff options
context:
space:
mode:
authorThomas Rosenstein <thomas.rosenstein@creamfinance.com>2020-10-18 21:34:36 +0200
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2020-10-20 09:01:40 +0900
commit0aff30a74216f499b8abfabc50016b041b319749 (patch)
treeb885cc8f8f9be0b9e11736ed9a74272944d59b90 /internal/pkg/table/policy.go
parent4e4113124f8d4a43b638d63d10af8698b4370d93 (diff)
fix #2289: improve regex to give expected results
Diffstat (limited to 'internal/pkg/table/policy.go')
-rw-r--r--internal/pkg/table/policy.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/pkg/table/policy.go b/internal/pkg/table/policy.go
index 08636991..d2e4f5ef 100644
--- a/internal/pkg/table/policy.go
+++ b/internal/pkg/table/policy.go
@@ -1135,7 +1135,7 @@ func ParseExtCommunity(arg string) (bgp.ExtendedCommunityInterface, error) {
return bgp.ParseExtendedCommunity(subtype, value)
}
-var _regexpCommunity2 = regexp.MustCompile(`(\d+.)*\d+:\d+`)
+var _regexpCommunity2 = regexp.MustCompile(`^(\d+.)*\d+:\d+$`)
func ParseCommunityRegexp(arg string) (*regexp.Regexp, error) {
i, err := strconv.ParseUint(arg, 10, 32)