From 4660a6bf8854c045691de867d269f73f0adb8f24 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Sun, 27 Jan 2019 21:38:07 +0900 Subject: cmd/gobgp: fix showingglobal policy Needs to specify the global rib name for ListPolicyAssignment API. Signed-off-by: FUJITA Tomonori --- cmd/gobgp/neighbor.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmd') diff --git a/cmd/gobgp/neighbor.go b/cmd/gobgp/neighbor.go index 9ebbff67..ae039904 100644 --- a/cmd/gobgp/neighbor.go +++ b/cmd/gobgp/neighbor.go @@ -1054,6 +1054,9 @@ func showNeighborPolicy(remoteIP, policyType string, indent int) error { default: return fmt.Errorf("invalid policy type: choose from (in|import|export)") } + if remoteIP == "" { + remoteIP = globalRIBName + } stream, err := client.ListPolicyAssignment(ctx, &api.ListPolicyAssignmentRequest{ Name: remoteIP, Direction: dir, -- cgit v1.2.3