diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-02-08 05:14:12 -0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-02-08 05:14:12 -0800 |
commit | fa84d4783caa94823e613bc63489a29216df4538 (patch) | |
tree | 7172547d6778037970e94ef0cbb9475017a9250e /server/server.go | |
parent | 05895eb732031f516c0cdda583b9531a33bea075 (diff) |
server: fix socket md5
fix the regression due to c9436bc
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go index 4dfb2ba2..f98d4f4c 100644 --- a/server/server.go +++ b/server/server.go @@ -174,7 +174,8 @@ func (server *BgpServer) Listeners(addr string) []*net.TCPListener { list := make([]*net.TCPListener, 0, len(server.listeners)) rhs := net.ParseIP(addr).To4() != nil for _, l := range server.listeners { - lhs := net.ParseIP(l.Addr().String()).To4() != nil + host, _, _ := net.SplitHostPort(l.Addr().String()) + lhs := net.ParseIP(host).To4() != nil if lhs == rhs { list = append(list, l) } |