diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-08-03 18:33:37 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-08-05 17:24:36 +0900 |
commit | c059eb0f88969bac02aad13771a1bc2c82c2a803 (patch) | |
tree | 6deeffcfb90c92bd64b87ee1de560642b8808a1a /packet | |
parent | f66133c506585424a0e06bb769e2323b73ecddfb (diff) |
test: add scenario test for evpn
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'packet')
-rw-r--r-- | packet/bgp.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packet/bgp.go b/packet/bgp.go index 31dde01f..9fc3366e 100644 --- a/packet/bgp.go +++ b/packet/bgp.go @@ -3672,16 +3672,16 @@ func (p *PathAttributeExtendedCommunities) Serialize() ([]byte, error) { } func (p *PathAttributeExtendedCommunities) ToApiStruct() *api.PathAttr { - value := func(arg []ExtendedCommunityInterface) []string { - ret := make([]string, 0, len(arg)) + ecs := func(arg []ExtendedCommunityInterface) []*api.ExtendedCommunity { + ret := make([]*api.ExtendedCommunity, 0, len(arg)) for _, v := range p.Value { - ret = append(ret, v.String()) + ret = append(ret, v.ToApiStruct()) } return ret }(p.Value) return &api.PathAttr{ - Type: api.BGP_ATTR_TYPE_EXTENDED_COMMUNITIES, - Value: value, + Type: api.BGP_ATTR_TYPE_EXTENDED_COMMUNITIES, + ExtendedCommunities: ecs, } } |