diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-01-27 21:38:07 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-01-27 21:38:07 +0900 |
commit | 4660a6bf8854c045691de867d269f73f0adb8f24 (patch) | |
tree | b415dfb801855036cfcfffd7283b7a63d1bbe97b /cmd | |
parent | e0e0f5a1ebfdc9ee30e87a4b7ce13ae35b493498 (diff) |
cmd/gobgp: fix showingglobal policy
Needs to specify the global rib name for ListPolicyAssignment API.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gobgp/neighbor.go | 3 |
1 files changed, 3 insertions, 0 deletions
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, |