summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-01-01 02:49:05 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-01-04 16:46:28 +0900
commitce1d27ba8c49856c2e67c65f076caf48dbb6765e (patch)
tree3e97ec845190758c73c0da080300a36a4cb17feb /server/server.go
parentaa3b0436d20a1d9ed16fee34b323ea6e73ba0c85 (diff)
server: handle open message only in fsm
we don't need to spread this handling to peer.go and server.go Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/server.go b/server/server.go
index 6d0fc060..afb4550a 100644
--- a/server/server.go
+++ b/server/server.go
@@ -444,7 +444,7 @@ func (server *BgpServer) Serve() {
}
func newSenderMsg(peer *Peer, messages []*bgp.BGPMessage) *SenderMsg {
- _, y := peer.capMap[bgp.BGP_CAP_FOUR_OCTET_AS_NUMBER]
+ _, y := peer.fsm.capMap[bgp.BGP_CAP_FOUR_OCTET_AS_NUMBER]
return &SenderMsg{
messages: messages,
sendCh: peer.outgoing,
@@ -466,7 +466,7 @@ func filterpath(peer *Peer, path *table.Path) *table.Path {
if path == nil {
return nil
}
- if _, ok := peer.rfMap[path.GetRouteFamily()]; !ok {
+ if _, ok := peer.fsm.rfMap[path.GetRouteFamily()]; !ok {
return nil
}
@@ -550,7 +550,7 @@ func (server *BgpServer) dropPeerAllRoutes(peer *Peer) []*SenderMsg {
if !targetPeer.isRouteServerClient() || targetPeer == peer || targetPeer.fsm.state != bgp.BGP_FSM_ESTABLISHED {
continue
}
- if _, ok := targetPeer.rfMap[rf]; !ok {
+ if _, ok := targetPeer.fsm.rfMap[rf]; !ok {
continue
}
@@ -583,7 +583,7 @@ func (server *BgpServer) dropPeerAllRoutes(peer *Peer) []*SenderMsg {
if targetPeer.isRouteServerClient() || targetPeer.fsm.state != bgp.BGP_FSM_ESTABLISHED {
continue
}
- if _, ok := targetPeer.rfMap[rf]; !ok {
+ if _, ok := targetPeer.fsm.rfMap[rf]; !ok {
continue
}
targetPeer.adjRibOut.Update(pathList)
@@ -847,7 +847,7 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg, incoming chan *
}
}
if len(listener) > 0 {
- _, y := peer.capMap[bgp.BGP_CAP_FOUR_OCTET_AS_NUMBER]
+ _, y := peer.fsm.capMap[bgp.BGP_CAP_FOUR_OCTET_AS_NUMBER]
l, _ := peer.fsm.LocalHostPort()
ev := &watcherEventUpdateMsg{
message: m,