diff options
Diffstat (limited to 'pkg/server/server.go')
-rw-r--r-- | pkg/server/server.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/server/server.go b/pkg/server/server.go index 82efeb6a..d77512f5 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -250,6 +250,7 @@ func (s *BgpServer) passConnToPeer(conn *net.TCPConn) { } peer.fsm.lock.RLock() localAddr := peer.fsm.pConf.Transport.Config.LocalAddress + bindInterface := peer.fsm.pConf.Transport.Config.BindInterface peer.fsm.lock.RUnlock() localAddrValid := func(laddr string) bool { if laddr == "0.0.0.0" || laddr == "::" { @@ -262,12 +263,13 @@ func (s *BgpServer) passConnToPeer(conn *net.TCPConn) { } host, _, _ := net.SplitHostPort(l.String()) - if host != laddr { + if host != laddr && bindInterface == "" { log.WithFields(log.Fields{ "Topic": "Peer", "Key": remoteAddr, "Configured addr": laddr, "Addr": host, + "BindInterface": bindInterface, }).Info("Mismatched local address") return false } |