diff options
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/server.go b/server/server.go index edea141d..8e3b362f 100644 --- a/server/server.go +++ b/server/server.go @@ -951,7 +951,7 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg) { // any routes (and EORs) before we send ours (or deferral-timer expires). var pathList []*table.Path _, y := peer.fsm.rfMap[bgp.RF_RTC_UC] - if c := config.GetAfiSafi(peer.fsm.pConf, bgp.RF_RTC_UC); y && !peer.fsm.pConf.GracefulRestart.State.PeerRestarting && c.RouteTargetMembership.Config.DeferralTime > 0 { + if c := peer.fsm.pConf.GetAfiSafi(bgp.RF_RTC_UC); y && !peer.fsm.pConf.GracefulRestart.State.PeerRestarting && c.RouteTargetMembership.Config.DeferralTime > 0 { pathList, _ = peer.getBestFromLocal([]bgp.RouteFamily{bgp.RF_RTC_UC}) t := c.RouteTargetMembership.Config.DeferralTime for _, f := range peer.configuredRFlist() { @@ -1102,7 +1102,7 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg) { // 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.Config.DeferralTime > 0 { + if c := peer.fsm.pConf.GetAfiSafi(bgp.RF_RTC_UC); rtc && c != nil && c.RouteTargetMembership.Config.DeferralTime > 0 { log.WithFields(log.Fields{ "Topic": "Peer", "Key": peer.ID(), @@ -1559,7 +1559,7 @@ func (s *BgpServer) softResetOut(addr string, family bgp.RouteFamily, deferral b "Key": peer.ID(), "Families": families, }).Debug("deferral timer expired") - } else if c := config.GetAfiSafi(peer.fsm.pConf, bgp.RF_RTC_UC); y && !c.MpGracefulRestart.State.EndOfRibReceived { + } else if c := peer.fsm.pConf.GetAfiSafi(bgp.RF_RTC_UC); y && !c.MpGracefulRestart.State.EndOfRibReceived { log.WithFields(log.Fields{ "Topic": "Peer", "Key": peer.ID(), @@ -1775,7 +1775,7 @@ func (server *BgpServer) addPeerGroup(c *config.PeerGroup) error { } func (server *BgpServer) addNeighbor(c *config.Neighbor) error { - addr, err := config.ExtractNeighborAddress(c) + addr, err := c.ExtractNeighborAddress() if err != nil { return err } @@ -1905,7 +1905,7 @@ func (server *BgpServer) deleteNeighbor(c *config.Neighbor, code, subcode uint8) } } - addr, err := config.ExtractNeighborAddress(c) + addr, err := c.ExtractNeighborAddress() if err != nil { return err } @@ -1999,7 +1999,7 @@ func (s *BgpServer) updateNeighbor(c *config.Neighbor) (needsSoftResetIn bool, e } } - addr, err := config.ExtractNeighborAddress(c) + addr, err := c.ExtractNeighborAddress() if err != nil { return needsSoftResetIn, err } |