summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-01-29 11:37:04 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-01-29 11:38:27 +0900
commit2adf4c392e444d393b038d0952d4b5cf7d656d28 (patch)
tree9271444e2e1378f3267fc068dbebdd1b00160670 /server/fsm.go
parentb05da5ddc9c9f78de5883c9dc8f94fa531688085 (diff)
fsm: remove FSM.confedCheck
no need to make this FSM's field. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/fsm.go')
-rw-r--r--server/fsm.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/fsm.go b/server/fsm.go
index 98c2518c..6e565a29 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -132,7 +132,6 @@ type FSM struct {
rfMap map[bgp.RouteFamily]bool
capMap map[bgp.BGPCapabilityCode][]bgp.ParameterCapabilityInterface
recvOpen *bgp.BGPMessage
- confedCheck bool
peerInfo *table.PeerInfo
policy *table.RoutingPolicy
}
@@ -202,7 +201,6 @@ func NewFSM(gConf *config.Global, pConf *config.Neighbor, policy *table.RoutingP
getActiveCh: make(chan struct{}),
rfMap: make(map[bgp.RouteFamily]bool),
capMap: make(map[bgp.BGPCapabilityCode][]bgp.ParameterCapabilityInterface),
- confedCheck: !config.IsConfederationMember(gConf, pConf) && config.IsEBGPPeer(gConf, pConf),
peerInfo: table.NewPeerInfo(gConf, pConf),
policy: policy,
}
@@ -555,7 +553,8 @@ func (h *FSMHandler) recvMessageWithError() error {
switch m.Header.Type {
case bgp.BGP_MSG_UPDATE:
body := m.Body.(*bgp.BGPUpdate)
- _, err := bgp.ValidateUpdateMsg(body, h.fsm.rfMap, h.fsm.confedCheck)
+ confedCheck := !config.IsConfederationMember(h.fsm.gConf, h.fsm.pConf) && config.IsEBGPPeer(h.fsm.gConf, h.fsm.pConf)
+ _, err := bgp.ValidateUpdateMsg(body, h.fsm.rfMap, confedCheck)
if err != nil {
log.WithFields(log.Fields{
"Topic": "Peer",