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

no error any more

parent 035b1223
No related branches found
No related tags found
No related merge requests found
...@@ -34,17 +34,14 @@ func pathAttribues(p *route.Path) (*packet.PathAttribute, error) { ...@@ -34,17 +34,14 @@ func pathAttribues(p *route.Path) (*packet.PathAttribute, error) {
nextHop.Next = localPref nextHop.Next = localPref
if p.BGPPath != nil { if p.BGPPath != nil {
err := addOptionalPathAttribues(p, localPref) optionals := addOptionalPathAttribues(p, localPref)
optionals.Next = p.BGPPath.UnknownAttributes
if err != nil {
return nil, err
}
} }
return asPath, nil return asPath, nil
} }
func addOptionalPathAttribues(p *route.Path, parent *packet.PathAttribute) error { func addOptionalPathAttribues(p *route.Path, parent *packet.PathAttribute) *packet.PathAttribute {
current := parent current := parent
if len(p.BGPPath.Communities) > 0 { if len(p.BGPPath.Communities) > 0 {
...@@ -65,7 +62,7 @@ func addOptionalPathAttribues(p *route.Path, parent *packet.PathAttribute) error ...@@ -65,7 +62,7 @@ func addOptionalPathAttribues(p *route.Path, parent *packet.PathAttribute) error
current = largeCommunities current = largeCommunities
} }
return nil return current
} }
type serializeAbleUpdate interface { type serializeAbleUpdate interface {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment