From f6c70e980d41066df51ce8cf63f2351911391e47 Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Wed, 27 Apr 2016 09:41:29 +0000 Subject: config: make route-target config struct aligned with open-config model have config/state container Signed-off-by: ISHIDA Wataru --- server/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server') diff --git a/server/server.go b/server/server.go index 37c43447..bed5029f 100644 --- a/server/server.go +++ b/server/server.go @@ -766,9 +766,9 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg) []*SenderMsg { // waiting sending non-route-target NLRIs since the peer won't send // any routes (and EORs) before we send ours (or deferral-timer expires). var pathList []*table.Path - if c := config.GetAfiSafi(peer.fsm.pConf, bgp.RF_RTC_UC); !peer.fsm.pConf.GracefulRestart.State.PeerRestarting && peer.fsm.rfMap[bgp.RF_RTC_UC] && c.RouteTargetMembership.DeferralTime > 0 { + if c := config.GetAfiSafi(peer.fsm.pConf, bgp.RF_RTC_UC); !peer.fsm.pConf.GracefulRestart.State.PeerRestarting && peer.fsm.rfMap[bgp.RF_RTC_UC] && c.RouteTargetMembership.Config.DeferralTime > 0 { pathList, _ = peer.getBestFromLocal([]bgp.RouteFamily{bgp.RF_RTC_UC}) - t := c.RouteTargetMembership.DeferralTime + t := c.RouteTargetMembership.Config.DeferralTime for _, f := range peer.configuredRFlist() { if f != bgp.RF_RTC_UC { time.AfterFunc(time.Second*time.Duration(t), deferralExpiredFunc(f)) @@ -944,7 +944,7 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg) []*SenderMsg { // received EOR of route-target address family // outbound filter is now ready, let's flash non-route-target NLRIs - if c := config.GetAfiSafi(peer.fsm.pConf, bgp.RF_RTC_UC); rtc && c != nil && c.RouteTargetMembership.DeferralTime > 0 { + if c := config.GetAfiSafi(peer.fsm.pConf, bgp.RF_RTC_UC); rtc && c != nil && c.RouteTargetMembership.Config.DeferralTime > 0 { log.WithFields(log.Fields{ "Topic": "Peer", "Key": peer.ID(), -- cgit v1.2.3