From 329c2d316efecfed0331e30114d7086aa58e247e Mon Sep 17 00:00:00 2001 From: oc Date: Sat, 29 Sep 2018 17:03:37 +0800 Subject: api: add GwAddress to EVPNIPPrefixRoute --- internal/pkg/apiutil/attribute.go | 1 + internal/pkg/apiutil/attribute_test.go | 1 + 2 files changed, 2 insertions(+) (limited to 'internal/pkg/apiutil') diff --git a/internal/pkg/apiutil/attribute.go b/internal/pkg/apiutil/attribute.go index d87fff39..4d06419f 100644 --- a/internal/pkg/apiutil/attribute.go +++ b/internal/pkg/apiutil/attribute.go @@ -391,6 +391,7 @@ func MarshalNLRI(value bgp.AddrPrefixInterface) *any.Any { IpPrefix: r.IPPrefix.String(), IpPrefixLen: uint32(r.IPPrefixLength), Label: r.Label, + GwAddress: r.GWIPAddress.String(), } } case *bgp.LabeledVPNIPAddrPrefix: diff --git a/internal/pkg/apiutil/attribute_test.go b/internal/pkg/apiutil/attribute_test.go index 60f460cd..c948670d 100644 --- a/internal/pkg/apiutil/attribute_test.go +++ b/internal/pkg/apiutil/attribute_test.go @@ -652,6 +652,7 @@ func Test_MpReachNLRIAttribute_EVPN_Prefix_Route(t *testing.T) { IpPrefixLen: 24, IpPrefix: "192.168.101.0", Label: 200, + GwAddress: "172.16.101.1", }) assert.Nil(err) nlris = append(nlris, a) -- cgit v1.2.3