diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-01-02 02:13:30 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-01-09 05:17:57 -0800 |
commit | cc8d0fd748f83d774ec59e680586421cd9d9a6d2 (patch) | |
tree | 393a564c3d6389084f098732528b3b4206cd60de /server/peer.go | |
parent | 0c1c373e498db1023e4f307f362598a096e36df0 (diff) |
config: refactor config structure
- change config variable name to chaincase from camelcase
- remove unnecessary wrapper structs which only contain one slice field
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/peer.go')
-rw-r--r-- | server/peer.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/peer.go b/server/peer.go index 518edefe..5233c892 100644 --- a/server/peer.go +++ b/server/peer.go @@ -58,7 +58,7 @@ func NewPeer(g config.Global, conf config.Neighbor, loc *table.TableManager, pol peer.tableId = tableId conf.State.SessionState = uint32(bgp.BGP_FSM_IDLE) conf.Timers.State.Downtime = time.Now().Unix() - rfs, _ := conf.AfiSafis.ToRfList() + rfs, _ := config.AfiSafis(conf.AfiSafis).ToRfList() peer.adjRibIn = table.NewAdjRib(peer.ID(), rfs) peer.adjRibOut = table.NewAdjRib(peer.ID(), rfs) peer.fsm = NewFSM(&g, &conf, policy) @@ -94,7 +94,7 @@ func (peer *Peer) isRouteReflectorClient() bool { } func (peer *Peer) configuredRFlist() []bgp.RouteFamily { - rfs, _ := peer.conf.AfiSafis.ToRfList() + rfs, _ := config.AfiSafis(peer.conf.AfiSafis).ToRfList() return rfs } |