From cf936759004764cae72099ba87972f1153913ba6 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 6 Jan 2015 02:51:45 -0800 Subject: packet: fix AS_PATH JSON marshal Signed-off-by: FUJITA Tomonori --- packet/bgp.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'packet/bgp.go') 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 { -- cgit v1.2.3