Skip to content
Snippets Groups Projects
Commit 98e8b40b authored by Daniel Czerwonk's avatar Daniel Czerwonk
Browse files

Merge remote-tracking branch 'origin/master' into bgp_large_community_support

parents 032ece0b b05bdeaf
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ package server
import (
"fmt"
"strings"
log "github.com/sirupsen/logrus"
......@@ -25,7 +26,7 @@ func newUpdateSender(fsm *FSM) *UpdateSender {
// AddPath serializes a new path and sends out a BGP update message
func (u *UpdateSender) AddPath(pfx net.Prefix, p *route.Path) error {
asPathPA, err := packet.ParseASPathStr(fmt.Sprintf("%d %s", u.fsm.localASN, p.BGPPath.ASPath))
asPathPA, err := packet.ParseASPathStr(strings.TrimRight(fmt.Sprintf("%d %s", u.fsm.localASN, p.BGPPath.ASPath), " "))
if err != nil {
return fmt.Errorf("Unable to parse AS path: %v", err)
}
......
......@@ -2,6 +2,7 @@ package server
import (
"fmt"
"strings"
log "github.com/sirupsen/logrus"
......@@ -25,7 +26,7 @@ func newUpdateSenderAddPath(fsm *FSM) *UpdateSenderAddPath {
// AddPath serializes a new path and sends out a BGP update message
func (u *UpdateSenderAddPath) AddPath(pfx net.Prefix, p *route.Path) error {
asPathPA, err := packet.ParseASPathStr(fmt.Sprintf("%d %s", u.fsm.localASN, p.BGPPath.ASPath))
asPathPA, err := packet.ParseASPathStr(strings.TrimRight(fmt.Sprintf("%d %s", u.fsm.localASN, p.BGPPath.ASPath), " "))
if err != nil {
return fmt.Errorf("Unable to parse AS path: %v", err)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment