summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-06 02:51:45 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-06 02:51:45 -0800
commitcf936759004764cae72099ba87972f1153913ba6 (patch)
tree4389db4d0135185800e28cd9ec0581122a5b3c55
parent00dc1a3befb4ef0f1424b93b7caa53e8b4b2f755 (diff)
packet: fix AS_PATH JSON marshal
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--packet/bgp.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/packet/bgp.go b/packet/bgp.go
index f7427973..c9ca21a4 100644
--- a/packet/bgp.go
+++ b/packet/bgp.go
@@ -1305,7 +1305,10 @@ func (p *PathAttributeAsPath) MarshalJSON() ([]byte, error) {
if y {
aslist = append(aslist, path.AS...)
} else {
- // TODO aspathparam
+ path := a.(*AsPathParam)
+ for _, v := range path.AS {
+ aslist = append(aslist, uint32(v))
+ }
}
}
return json.Marshal(struct {