summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--internal/pkg/apiutil/attribute.go1
-rw-r--r--internal/pkg/apiutil/attribute_test.go1
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)