summaryrefslogtreecommitdiffhomepage
path: root/server/peer.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-03 12:23:43 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-03 12:23:43 +0900
commitf0ae221b894fdd02f697f4fb6994623082e2175e (patch)
treea75e87baad198d843e5201099563713886edfb28 /server/peer.go
parentd387fd92e71a42e243cedef32f0812c72474c418 (diff)
update the whole code for the latest openconfig yang files
The modified openconfig yang files are available at: https://github.com/osrg/yang/tree/gobgp Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/peer.go')
-rw-r--r--server/peer.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/peer.go b/server/peer.go
index 4e8f4ae8..02956788 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -47,8 +47,8 @@ type peerMsg struct {
type Peer struct {
t tomb.Tomb
- globalConfig config.GlobalType
- peerConfig config.NeighborType
+ globalConfig config.Global
+ peerConfig config.Neighbor
acceptedConnCh chan net.Conn
serverMsgCh chan *serverMsg
peerMsgCh chan *peerMsg
@@ -65,7 +65,7 @@ type Peer struct {
outgoing chan *bgp.BGPMessage
}
-func NewPeer(g config.GlobalType, peer config.NeighborType, serverMsgCh chan *serverMsg, peerMsgCh chan *peerMsg, peerList []*serverMsgDataPeer) *Peer {
+func NewPeer(g config.Global, peer config.Neighbor, serverMsgCh chan *serverMsg, peerMsgCh chan *peerMsg, peerList []*serverMsgDataPeer) *Peer {
p := &Peer{
globalConfig: g,
peerConfig: peer,
@@ -221,7 +221,7 @@ func (peer *Peer) handleREST(restReq *api.RestRequest) {
case api.REQ_NEIGHBOR_SHUTDOWN:
peer.outgoing <- bgp.NewBGPNotificationMessage(bgp.BGP_ERROR_CEASE, bgp.BGP_ERROR_SUB_ADMINISTRATIVE_SHUTDOWN, nil)
case api.REQ_NEIGHBOR_RESET:
- peer.fsm.idleHoldTime = peer.peerConfig.Timers.IdleHoldTImeAfterReset
+ peer.fsm.idleHoldTime = peer.peerConfig.Timers.IdleHoldTimeAfterReset
peer.outgoing <- bgp.NewBGPNotificationMessage(bgp.BGP_ERROR_CEASE, bgp.BGP_ERROR_SUB_ADMINISTRATIVE_RESET, nil)
case api.REQ_NEIGHBOR_SOFT_RESET, api.REQ_NEIGHBOR_SOFT_RESET_IN:
// soft-reconfiguration inbound
@@ -410,7 +410,7 @@ func (peer *Peer) loop() error {
// clear counter
if h.fsm.adminState == ADMIN_STATE_DOWN {
- h.fsm.peerConfig.BgpNeighborCommonState = config.BgpNeighborCommonStateType{}
+ h.fsm.peerConfig.BgpNeighborCommonState = config.BgpNeighborCommonState{}
}
case FSM_MSG_BGP_MESSAGE: