From d1c2b53b9b952105a7d50b238a2d1bd94637cb36 Mon Sep 17 00:00:00 2001
From: Daniel Czerwonk <daniel@dan-nrw.de>
Date: Mon, 25 Jun 2018 23:55:51 +0200
Subject: [PATCH] fixed attribute return

---
 protocols/bgp/server/fsm_established.go | 1 +
 protocols/bgp/server/update_helper.go   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/protocols/bgp/server/fsm_established.go b/protocols/bgp/server/fsm_established.go
index d4464a7b..e74a660a 100644
--- a/protocols/bgp/server/fsm_established.go
+++ b/protocols/bgp/server/fsm_established.go
@@ -171,6 +171,7 @@ func (s *establishedState) msgReceived(data []byte) (state, string) {
 	}
 	switch msg.Header.Type {
 	case packet.NotificationMsg:
+		fmt.Println(data)
 		return s.notification()
 	case packet.UpdateMsg:
 		return s.update(msg)
diff --git a/protocols/bgp/server/update_helper.go b/protocols/bgp/server/update_helper.go
index b472127c..50850cb6 100644
--- a/protocols/bgp/server/update_helper.go
+++ b/protocols/bgp/server/update_helper.go
@@ -41,7 +41,7 @@ func pathAttribues(p *route.Path) (*packet.PathAttribute, error) {
 		}
 	}
 
-	return origin, nil
+	return asPath, nil
 }
 
 func addOptionalPathAttribues(p *route.Path, parent *packet.PathAttribute) error {
-- 
GitLab