From 1ee998cc8bb84e2178f4cf9408c4203dd606ef99 Mon Sep 17 00:00:00 2001 From: Imcom Jin Date: Fri, 25 Sep 2020 11:29:59 +0800 Subject: bugfix: fix a panic when delete neighborset (all) by name directly --- cmd/gobgp/policy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/gobgp/policy.go b/cmd/gobgp/policy.go index 6408248f..710fdb38 100644 --- a/cmd/gobgp/policy.go +++ b/cmd/gobgp/policy.go @@ -323,7 +323,7 @@ func parseNeighborSet(args []string) (*api.DefinedSet, error) { } name := args[0] args = args[1:] - list := make([]string, 0, len(args[1:])) + list := make([]string, 0, len(args)) for _, arg := range args { address := net.ParseIP(arg) if address.To4() != nil { -- cgit v1.2.3