summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/server/server.go b/server/server.go
index 87348a72..d86e51df 100644
--- a/server/server.go
+++ b/server/server.go
@@ -891,15 +891,15 @@ func (server *BgpServer) propagateUpdate(peer *Peer, pathList []*table.Path) {
// graph that is derived from Route Target membership information.
if peer != nil && path != nil && path.GetRouteFamily() == bgp.RF_RTC_UC {
rt := path.GetNlri().(*bgp.RouteTargetMembershipNLRI).RouteTarget
- fs := make([]bgp.RouteFamily, 0, len(peer.configuredRFlist()))
- for _, f := range peer.configuredRFlist() {
+ fs := make([]bgp.RouteFamily, 0, len(peer.negotiatedRFList()))
+ for _, f := range peer.negotiatedRFList() {
if f != bgp.RF_RTC_UC {
fs = append(fs, f)
}
}
var candidates []*table.Path
if path.IsWithdraw {
- candidates, _ = server.getBestFromLocal(peer, peer.configuredRFlist())
+ candidates, _ = server.getBestFromLocal(peer, fs)
} else {
candidates = server.globalRib.GetBestPathList(peer.TableID(), 0, fs)
}
@@ -1141,13 +1141,13 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg) {
if c := peer.fsm.pConf.GetAfiSafi(bgp.RF_RTC_UC); y && !peer.fsm.pConf.GracefulRestart.State.PeerRestarting && c.RouteTargetMembership.Config.DeferralTime > 0 {
pathList, _ = server.getBestFromLocal(peer, []bgp.RouteFamily{bgp.RF_RTC_UC})
t := c.RouteTargetMembership.Config.DeferralTime
- for _, f := range peer.configuredRFlist() {
+ for _, f := range peer.negotiatedRFList() {
if f != bgp.RF_RTC_UC {
time.AfterFunc(time.Second*time.Duration(t), deferralExpiredFunc(f))
}
}
} else {
- pathList, _ = server.getBestFromLocal(peer, peer.configuredRFlist())
+ pathList, _ = server.getBestFromLocal(peer, peer.negotiatedRFList())
}
if len(pathList) > 0 {
@@ -1283,7 +1283,7 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg) {
if !p.isGracefulRestartEnabled() {
continue
}
- paths, _ := server.getBestFromLocal(p, p.configuredRFlist())
+ paths, _ := server.getBestFromLocal(p, p.negotiatedRFList())
if len(paths) > 0 {
sendFsmOutgoingMsg(p, paths, nil, false)
}
@@ -1319,8 +1319,8 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg) {
"Topic": "Peer",
"Key": peer.ID(),
}).Debug("received route-target eor. flash non-route-target NLRIs")
- families := make([]bgp.RouteFamily, 0, len(peer.configuredRFlist()))
- for _, f := range peer.configuredRFlist() {
+ families := make([]bgp.RouteFamily, 0, len(peer.negotiatedRFList()))
+ for _, f := range peer.negotiatedRFList() {
if f != bgp.RF_RTC_UC {
families = append(families, f)
}
@@ -1750,7 +1750,7 @@ func (s *BgpServer) softResetOut(addr string, family bgp.RouteFamily, deferral b
families := []bgp.RouteFamily{family}
if family == bgp.RouteFamily(0) {
- families = peer.configuredRFlist()
+ families = peer.negotiatedRFList()
}
if deferral {