summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-11-26 23:16:25 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-11-26 23:16:25 +0900
commit9225bec8e032aebfbf52b6435bc0b7bb9b7a93ff (patch)
treed25777d0414e488b208ad0650557e8810984fb2a /server/server.go
parentb1953e81d6cadcd6e1ec28031d3f9f460d3d954d (diff)
cmd: fix getNeighbor() to take bogus neighbor name
This fixes the ae7e572550df919c1b9990da8787fc1e860bc20d commit regression. gobgp neighbor command takes a bogus neighbor name like the following: fujita@ubuntu:~/go/src/github.com/osrg/gobgp/gobgp$ ./gobgp n 1 BGP neighbor is 172.17.0.2, remote AS 65001 BGP version 4, remote router ID unknown BGP state = active, up for 17496d 14:21:50 BGP OutQ = 0, Flops = 0 Hold time is 0, keepalive interval is 0 seconds Configured hold time is 60, keepalive interval is 20 seconds Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go
index ee497874..edea141d 100644
--- a/server/server.go
+++ b/server/server.go
@@ -1748,7 +1748,7 @@ func (s *BgpServer) GetNeighbor(address string, getAdvertised bool) (l []*config
s.mgmtOperation(func() error {
l = make([]*config.Neighbor, 0, len(s.neighborMap))
for k, peer := range s.neighborMap {
- if address != "" && address != k {
+ if address != "" && address != k && address != peer.fsm.pConf.Config.NeighborInterface {
continue
}
l = append(l, peer.ToConfig(getAdvertised))