diff options
-rw-r--r-- | server/peer.go | 1 | ||||
-rw-r--r-- | table/table_manager.go | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/server/peer.go b/server/peer.go index ee3b2311..ec3f3f10 100644 --- a/server/peer.go +++ b/server/peer.go @@ -265,6 +265,7 @@ func (peer *Peer) loop() error { } if oldState == bgp.BGP_FSM_ESTABLISHED { peer.fsm.peerConfig.BgpNeighborCommonState.Uptime = time.Time{} + peer.adjRib.DropAllIn(peer.rf) pm := &peerMsg{ msgType: PEER_MSG_PEER_DOWN, msgData: peer.peerInfo, diff --git a/table/table_manager.go b/table/table_manager.go index 7112c0ca..1fb95f3f 100644 --- a/table/table_manager.go +++ b/table/table_manager.go @@ -281,6 +281,11 @@ func (adj *AdjRib) GetOutPathList(rf bgp.RouteFamily) []Path { return adj.getPathList(adj.adjRibOut[rf]) } +func (adj *AdjRib) DropAllIn(rf bgp.RouteFamily) { + // replace old one + adj.adjRibIn[rf] = make(map[string]*ReceivedRoute) +} + type ReceivedRoute struct { path Path filtered bool |