diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-04-21 00:18:10 -0700 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-04-21 01:09:10 -0700 |
commit | ae7e572550df919c1b9990da8787fc1e860bc20d (patch) | |
tree | e462e44036eff4e342223c7e7dc21c4f463b8f58 | |
parent | 633b693ec54d94e6da3fe130c79103901fd36843 (diff) |
cmd: fix neighbor get with the interface name
fix the regression of commit 7fc795694637c06be52cad97cf7397db0c7431fb
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | gobgp/cmd/neighbor.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gobgp/cmd/neighbor.go b/gobgp/cmd/neighbor.go index 1f92c9b9..3d2d6168 100644 --- a/gobgp/cmd/neighbor.go +++ b/gobgp/cmd/neighbor.go @@ -50,6 +50,9 @@ func getNeighbors(vrf string) (neighbors, error) { } func getNeighbor(name string, enableAdvertised bool) (*config.Neighbor, error) { + if net.ParseIP(name) == nil { + name = "" + } return client.GetNeighbor(name, enableAdvertised) } |