summaryrefslogtreecommitdiffhomepage
path: root/table
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-01-09 15:29:01 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-01-09 15:29:01 +0900
commitf42b8fbae6d8eb381967e82867a1b67188bdcbc5 (patch)
treea4bbeaf210cd43620128d5992c7805f832b6d198 /table
parent093ea72359442abad958a7d3cf8d731e7c8749ec (diff)
table: copy path-attr list before converting to as2 path
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table')
-rw-r--r--table/message.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/table/message.go b/table/message.go
index ad44a88f..ecd1610c 100644
--- a/table/message.go
+++ b/table/message.go
@@ -23,6 +23,9 @@ import (
)
func UpdatePathAttrs2ByteAs(msg *bgp.BGPUpdate) error {
+ ps := msg.PathAttributes
+ msg.PathAttributes = make([]bgp.PathAttributeInterface, len(ps))
+ copy(msg.PathAttributes, ps)
var asAttr *bgp.PathAttributeAsPath
idx := 0
for i, attr := range msg.PathAttributes {