Skip to content
Snippets Groups Projects
Commit 3f9efae9 authored by Oliver Herms's avatar Oliver Herms
Browse files

Merge branch 'newfsm' of github.com:bio-routing/bio-rd into newfsm

parents 6fe80812 453a853e
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
......@@ -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 (
......
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment