summaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-04-20 15:31:27 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-04-20 15:31:27 +0900
commit7fc795694637c06be52cad97cf7397db0c7431fb (patch)
tree9b4baa7d88122b2b0370758cf2b4c5aba8de8a6f /client
parente429c1aaf4dd85459dfafc1a5efac9d4778370f6 (diff)
improve performance of getting single neighbor information
avoid calculation of the number of adjout that will not be used. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'client')
-rw-r--r--client/client.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/client.go b/client/client.go
index ba2d415a..c571facd 100644
--- a/client/client.go
+++ b/client/client.go
@@ -128,7 +128,7 @@ func (cli *Client) EnableZebra(c *config.Zebra) error {
}
func (cli *Client) getNeighbor(name string, afi int, vrf string, enableAdvertised bool) ([]*config.Neighbor, error) {
- ret, err := cli.cli.GetNeighbor(context.Background(), &api.GetNeighborRequest{EnableAdvertised: enableAdvertised})
+ ret, err := cli.cli.GetNeighbor(context.Background(), &api.GetNeighborRequest{EnableAdvertised: enableAdvertised, Address: name})
if err != nil {
return nil, err
}