diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-04-05 13:32:58 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-04-10 00:04:48 +0900 |
commit | 7cec3f5e8984890b9cccc4a9911f821b891b9dfe (patch) | |
tree | e357a1c47b68e6b168cf6fcf2b0925c99935b15b /server/server.go | |
parent | 310be31d8832ec630ca87f448ad22e192c9c4e26 (diff) |
fsm: delegate 2byte as handling to fsm send goroutine
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/server/server.go b/server/server.go index 41d2a718..5797e09e 100644 --- a/server/server.go +++ b/server/server.go @@ -41,7 +41,6 @@ type SenderMsg struct { messages []*bgp.BGPMessage sendCh chan *bgp.BGPMessage destination string - twoBytesAs bool } type broadcastMsg interface { @@ -216,14 +215,6 @@ func (server *BgpServer) Serve() { } for _, b := range m.messages { - if m.twoBytesAs == false && b.Header.Type == bgp.BGP_MSG_UPDATE { - log.WithFields(log.Fields{ - "Topic": "Peer", - "Key": m.destination, - "Data": b, - }).Debug("update for 2byte AS peer") - table.UpdatePathAttrs2ByteAs(b.Body.(*bgp.BGPUpdate)) - } w(m.sendCh, b) } } @@ -365,12 +356,10 @@ func (server *BgpServer) Serve() { } func newSenderMsg(peer *Peer, messages []*bgp.BGPMessage) *SenderMsg { - _, y := peer.fsm.capMap[bgp.BGP_CAP_FOUR_OCTET_AS_NUMBER] return &SenderMsg{ messages: messages, sendCh: peer.outgoing, destination: peer.conf.Config.NeighborAddress, - twoBytesAs: y, } } |