diff options
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go index 4c192a0c..495b5d4b 100644 --- a/server/server.go +++ b/server/server.go @@ -263,6 +263,11 @@ func (server *BgpServer) Serve() { remoteAddr, _, _ := net.SplitHostPort(conn.RemoteAddr().String()) peer, found := server.neighborMap[remoteAddr] if found { + if peer.fsm.adminState != ADMIN_STATE_UP { + log.Debug("new connection for non admin-state-up peer ", remoteAddr, peer.fsm.adminState) + conn.Close() + return + } localAddrValid := func(laddr net.IP) bool { if laddr == nil { return true |