summaryrefslogtreecommitdiffhomepage
path: root/pkg/server/fsm.go
diff options
context:
space:
mode:
authorCarl Baldwin <carl@ecbaldwin.net>2019-10-11 14:25:08 -0600
committerCarl Baldwin <carl@ecbaldwin.net>2019-10-11 17:28:15 -0600
commitea87564b5b5d332ab48b6619c4a365559111e2c9 (patch)
tree5244bb4503ee2d299ef4930957472690edbb5c3e /pkg/server/fsm.go
parent1c8da637d4d730b268becb6b87efadc5c0872f53 (diff)
Remove policy from FSM
The `policy` member of fsm is apparently never used. Clean it up to avoid confusion. Policy is still set on the server and peers.
Diffstat (limited to 'pkg/server/fsm.go')
-rw-r--r--pkg/server/fsm.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/pkg/server/fsm.go b/pkg/server/fsm.go
index b06ddd5d..39618aa5 100644
--- a/pkg/server/fsm.go
+++ b/pkg/server/fsm.go
@@ -189,7 +189,6 @@ type fsm struct {
capMap map[bgp.BGPCapabilityCode][]bgp.ParameterCapabilityInterface
recvOpen *bgp.BGPMessage
peerInfo *table.PeerInfo
- policy *table.RoutingPolicy
gracefulRestartTimer *time.Timer
twoByteAsTrans bool
marshallingOptions *bgp.MarshallingOption
@@ -261,7 +260,7 @@ func (fsm *fsm) bmpStatsUpdate(statType uint16, increment int) {
}
}
-func newFSM(gConf *config.Global, pConf *config.Neighbor, policy *table.RoutingPolicy) *fsm {
+func newFSM(gConf *config.Global, pConf *config.Neighbor) *fsm {
adminState := adminStateUp
if pConf.Config.AdminDown {
adminState = adminStateDown
@@ -281,7 +280,6 @@ func newFSM(gConf *config.Global, pConf *config.Neighbor, policy *table.RoutingP
rfMap: make(map[bgp.RouteFamily]bgp.BGPAddPathMode),
capMap: make(map[bgp.BGPCapabilityCode][]bgp.ParameterCapabilityInterface),
peerInfo: table.NewPeerInfo(gConf, pConf),
- policy: policy,
gracefulRestartTimer: time.NewTimer(time.Hour),
notification: make(chan *bgp.BGPMessage, 1),
}