Skip to content

Commit

Permalink
cmd/gobgp: fix showingglobal policy
Browse files Browse the repository at this point in the history
Needs to specify the global rib name for ListPolicyAssignment API.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
  • Loading branch information
fujita committed Jan 27, 2019
1 parent e0e0f5a commit 4660a6b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/gobgp/neighbor.go
Expand Up @@ -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,
Expand Down

0 comments on commit 4660a6b

Please sign in to comment.