summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-01-04 15:59:36 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-01-04 16:46:28 +0900
commit5c835fcc4fa03e74dd03bf7661b65771bf539adc (patch)
tree37461942a561c373d5448449870829657d536e5a /server
parentafcd2e72fbe12e9ad8ab426e14c7110123678bad (diff)
server: don't put keepalive & notification to incoming ch
these msgs are garbage for server's main loop and just wasting channel buffer. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/fsm.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/fsm.go b/server/fsm.go
index 3aaf702f..6214d0b1 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -541,8 +541,12 @@ func (h *FSMHandler) recvMessageWithError() error {
if len(h.holdTimerResetCh) == 0 {
h.holdTimerResetCh <- true
}
+ if m.Header.Type == bgp.BGP_MSG_KEEPALIVE {
+ return nil
+ }
case bgp.BGP_MSG_NOTIFICATION:
h.reason = "Notification received"
+ return nil
}
}
}