summaryrefslogtreecommitdiffhomepage
path: root/server/peer.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/peer.go')
-rw-r--r--server/peer.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/peer.go b/server/peer.go
index 0ac082d3..5b4fd701 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -93,6 +93,10 @@ func (peer *Peer) isRouteReflectorClient() bool {
return peer.conf.RouteReflector.Config.RouteReflectorClient
}
+func (peer *Peer) isGracefulRestartEnabled() bool {
+ return peer.fsm.pConf.GracefulRestart.State.Enabled
+}
+
func (peer *Peer) configuredRFlist() []bgp.RouteFamily {
rfs, _ := config.AfiSafis(peer.conf.AfiSafis).ToRfList()
return rfs
@@ -126,6 +130,11 @@ func (peer *Peer) getBestFromLocal(rfList []bgp.RouteFamily) ([]*table.Path, []*
}
pathList = append(pathList, p)
}
+ if peer.isGracefulRestartEnabled() {
+ for _, family := range rfList {
+ pathList = append(pathList, table.NewEOR(family))
+ }
+ }
return pathList, filtered
}