diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-01-23 20:40:16 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-02-10 22:15:04 -0800 |
commit | 36f8911cee2557a0065ee291d03a6c6d88b537c0 (patch) | |
tree | b8eabbef187660c8a4b03cdbed0685c8581fec87 /server | |
parent | c3dbc58040a289aed7673149145e7d3a4944e183 (diff) |
table: support sending/receiving EOR msg
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r-- | server/peer.go | 9 |
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 } |