diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-27 06:58:50 -0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-27 06:58:50 -0800 |
commit | a3c1e53deda9f9834994751382f64827c14a9c32 (patch) | |
tree | 7c9504d979ac1afe425d8e57cb8117c389ec8f8c /server | |
parent | eff70c21375742b44ae5ebfd845dba38d0f3fcfc (diff) |
RouteFamily cleanup
RouteFamily is defined in two files.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r-- | server/fsm.go | 6 | ||||
-rw-r--r-- | server/peer.go | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/server/fsm.go b/server/fsm.go index 76ed85a6..de64a7fa 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -110,11 +110,11 @@ func (fsm *FSM) PeerInfoGet() *table.PeerInfo { } func (fsm *FSM) createPeerInfo() { - var rf table.RouteFamily + var rf bgp.RouteFamily if fsm.peerConfig.NeighborAddress.To4() != nil { - rf = table.RF_IPv4_UC + rf = bgp.RF_IPv4_UC } else { - rf = table.RF_IPv6_UC + rf = bgp.RF_IPv6_UC } fsm.peerInfo = &table.PeerInfo{ diff --git a/server/peer.go b/server/peer.go index fd36ce09..3ddc823a 100644 --- a/server/peer.go +++ b/server/peer.go @@ -42,7 +42,7 @@ type Peer struct { // here but it's the simplest and works our first target. rib *table.TableManager // for now we support only the same afi as transport - rf table.RouteFamily + rf bgp.RouteFamily } func NewPeer(g config.GlobalType, peer config.NeighborType, outEventCh chan *message) *Peer { @@ -58,9 +58,9 @@ func NewPeer(g config.GlobalType, peer config.NeighborType, outEventCh chan *mes p.fsm = NewFSM(&g, &peer, p.acceptedConnCh, p.incoming, p.outgoing) peer.BgpNeighborCommonState.State = uint32(bgp.BGP_FSM_IDLE) if peer.NeighborAddress.To4() != nil { - p.rf = table.RF_IPv4_UC + p.rf = bgp.RF_IPv4_UC } else { - p.rf = table.RF_IPv6_UC + p.rf = bgp.RF_IPv6_UC } p.adjRib = table.NewAdjRib() p.rib = table.NewTableManager() @@ -124,7 +124,7 @@ func (peer *Peer) path2update(pathList []table.Path) []*bgp.BGPMessage { continue } - if peer.rf == table.RF_IPv4_UC { + if peer.rf == bgp.RF_IPv4_UC { msgs = append(msgs, path2v4update(p)) } else { msgs = append(msgs, path2v6update(p)) |