summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/fsm.go')
-rw-r--r--server/fsm.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/fsm.go b/server/fsm.go
index d20de598..2de4787e 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -20,6 +20,7 @@ import (
log "github.com/Sirupsen/logrus"
"github.com/osrg/gobgp/config"
"github.com/osrg/gobgp/packet"
+ "github.com/osrg/gobgp/table"
"gopkg.in/tomb.v2"
"io"
"net"
@@ -80,6 +81,7 @@ type FSM struct {
h *FSMHandler
rfMap map[bgp.RouteFamily]bool
confedCheck bool
+ peerInfo *table.PeerInfo
}
func (fsm *FSM) bgpMessageStateUpdate(MessageType uint8, isIn bool) {
@@ -147,6 +149,7 @@ func NewFSM(gConf *config.Global, pConf *config.Neighbor) *FSM {
getActiveCh: make(chan struct{}),
rfMap: make(map[bgp.RouteFamily]bool),
confedCheck: !config.IsConfederationMember(gConf, pConf) && config.IsEBGPPeer(gConf, pConf),
+ peerInfo: table.NewPeerInfo(gConf, pConf),
}
fsm.t.Go(fsm.connectLoop)
return fsm
@@ -567,6 +570,7 @@ func (h *FSMHandler) opensent() bgp.FSMState {
fsm.sendNotificatonFromErrorMsg(h.conn, err.(*bgp.MessageError))
return bgp.BGP_FSM_IDLE
}
+ fsm.peerInfo.ID = body.ID
_, fsm.rfMap = open2Cap(body, fsm.pConf)
e := &fsmMsg{