diff options
author | oc <chenhaiq@yunify.com> | 2018-09-29 17:03:37 +0800 |
---|---|---|
committer | oc <chenhaiq@yunify.com> | 2018-09-29 22:52:15 +0800 |
commit | 329c2d316efecfed0331e30114d7086aa58e247e (patch) | |
tree | 7da21eda6c830b05c3b573c1fabc89a0ea571ba2 | |
parent | 94e70ba60afa615e0e0c031427e13ca7c34a1760 (diff) |
api: add GwAddress to EVPNIPPrefixRoute
-rw-r--r-- | internal/pkg/apiutil/attribute.go | 1 | ||||
-rw-r--r-- | internal/pkg/apiutil/attribute_test.go | 1 |
2 files changed, 2 insertions, 0 deletions
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) |