diff --git a/protocols/bgp/packet/decoder.go b/protocols/bgp/packet/decoder.go index 31583bf1b68257625dfaa3d8b8e40893982d6713..6431053338492e8981cd513ee6ecdd9b69511e89 100644 --- a/protocols/bgp/packet/decoder.go +++ b/protocols/bgp/packet/decoder.go @@ -114,7 +114,11 @@ func decodeNotificationMsg(buf *bytes.Buffer) (*BGPNotification, error) { return invalidErrCode(msg) } case Cease: +<<<<<<< HEAD if !(msg.ErrorSubcode == 0 || msg.ErrorSubcode == AdministrativeShutdown || msg.ErrorSubcode == AdministrativeReset) { +======= + if msg.ErrorSubcode == 0 || msg.ErrorSubcode > 8 { +>>>>>>> 453a853eeb0507c5e83706d9e3f251adba5b2484 return invalidErrCode(msg) } default: diff --git a/protocols/bgp/server/server.go b/protocols/bgp/server/server.go index 4a1f28a7a45d199191d9e59a36090d31704019d8..6cd2de5e28586e7a94146f05e7dccc8d30c1bc11 100644 --- a/protocols/bgp/server/server.go +++ b/protocols/bgp/server/server.go @@ -7,12 +7,8 @@ import ( "github.com/bio-routing/bio-rd/config" "github.com/bio-routing/bio-rd/protocols/bgp/packet" -<<<<<<< HEAD "github.com/bio-routing/bio-rd/routingtable" log "github.com/sirupsen/logrus" -======= - "github.com/bio-routing/bio-rd/routingtable/locRIB" ->>>>>>> Replaced FSM ) const ( diff --git a/protocols/bgp/server/update_sender.go b/protocols/bgp/server/update_sender.go index c394c47a50207eb794254283d1efc886123f82e7..6ba849d04938be4e19ea2ea22a083ea826896fa9 100644 --- a/protocols/bgp/server/update_sender.go +++ b/protocols/bgp/server/update_sender.go @@ -15,8 +15,12 @@ import ( // UpdateSender converts table changes into BGP update messages type UpdateSender struct { routingtable.ClientManager +<<<<<<< HEAD fsm *FSM2 iBGP bool +======= + fsm *FSM2 +>>>>>>> 453a853eeb0507c5e83706d9e3f251adba5b2484 } func newUpdateSender(fsm *FSM2) *UpdateSender { @@ -28,11 +32,15 @@ func newUpdateSender(fsm *FSM2) *UpdateSender { // AddPath serializes a new path and sends out a BGP update message func (u *UpdateSender) AddPath(pfx net.Prefix, p *route.Path) error { +<<<<<<< HEAD <<<<<<< HEAD pathAttrs, err := pathAttribues(p, u.fsm) ======= asPathPA, err := packet.ParseASPathStr(fmt.Sprintf("%d %s", u.fsm.peer.localASN, p.BGPPath.ASPath)) >>>>>>> Replaced FSM +======= + asPathPA, err := packet.ParseASPathStr(fmt.Sprintf("%d %s", u.fsm.peer.localASN, p.BGPPath.ASPath)) +>>>>>>> 453a853eeb0507c5e83706d9e3f251adba5b2484 if err != nil { log.Errorf("Unable to create BGP Update: %v", err) return nil diff --git a/protocols/bgp/server/update_sender_add_path.go b/protocols/bgp/server/update_sender_add_path.go index 0eb187899a5cb6bf6210ff52a6f46ad3ed46671c..edd36252888153dbed7d53c3a47704481b0eca66 100644 --- a/protocols/bgp/server/update_sender_add_path.go +++ b/protocols/bgp/server/update_sender_add_path.go @@ -26,6 +26,7 @@ func newUpdateSenderAddPath(fsm *FSM2) *UpdateSenderAddPath { // AddPath serializes a new path and sends out a BGP update message func (u *UpdateSenderAddPath) AddPath(pfx net.Prefix, p *route.Path) error { pathAttrs, err := pathAttribues(p, u.fsm) + if err != nil { log.Errorf("Unable to create BGP Update: %v", err) return nil