From c059eb0f88969bac02aad13771a1bc2c82c2a803 Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Mon, 3 Aug 2015 18:33:37 +0900 Subject: test: add scenario test for evpn Signed-off-by: ISHIDA Wataru --- packet/bgp.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'packet/bgp.go') 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, } } -- cgit v1.2.3