From b44362fddd6000842534e1318df3090b23a7cffb Mon Sep 17 00:00:00 2001 From: "Valli A. Vallimamod" Date: Fri, 31 Jul 2020 15:34:14 +0200 Subject: api: keeps backward compatibility when extending LsAddrPrefix --- internal/pkg/apiutil/attribute.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/pkg/apiutil/attribute.go') diff --git a/internal/pkg/apiutil/attribute.go b/internal/pkg/apiutil/attribute.go index 69622b0c..9d70802b 100644 --- a/internal/pkg/apiutil/attribute.go +++ b/internal/pkg/apiutil/attribute.go @@ -635,37 +635,37 @@ func MarshalNLRI(value bgp.AddrPrefixInterface) *any.Any { case *bgp.LsNodeNLRI: nlri = &api.LsAddrPrefix{ Type: api.LsNLRIType_LS_NLRI_NODE, + Nlri: MarshalLsNodeNLRI(n), Length: uint32(n.Length), ProtocolId: api.LsProtocolID(n.ProtocolID), Identifier: n.Identifier, - Nlri: MarshalLsNodeNLRI(n), } case *bgp.LsLinkNLRI: nlri = &api.LsAddrPrefix{ Type: api.LsNLRIType_LS_NLRI_LINK, + Nlri: MarshalLsLinkNLRI(n), Length: uint32(n.Length), ProtocolId: api.LsProtocolID(n.ProtocolID), Identifier: n.Identifier, - Nlri: MarshalLsLinkNLRI(n), } case *bgp.LsPrefixV4NLRI: nlri = &api.LsAddrPrefix{ Type: api.LsNLRIType_LS_NLRI_PREFIX_V4, + Nlri: MarshalLsPrefixV4NLRI(n), Length: uint32(n.Length), ProtocolId: api.LsProtocolID(n.ProtocolID), Identifier: n.Identifier, - Nlri: MarshalLsPrefixV4NLRI(n), } case *bgp.LsPrefixV6NLRI: nlri = &api.LsAddrPrefix{ Type: api.LsNLRIType_LS_NLRI_PREFIX_V6, + Nlri: MarshalLsPrefixV6NLRI(n), Length: uint32(n.Length), ProtocolId: api.LsProtocolID(n.ProtocolID), Identifier: n.Identifier, - Nlri: MarshalLsPrefixV6NLRI(n), } } } -- cgit v1.2.3