summaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2021-02-21 15:51:58 +0100
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2021-03-14 08:46:44 +0900
commit390e3127cea7a4b3fb9fcc089cfc7ffd02f108e1 (patch)
treead217b125dae6cd1ae2c4587fe75243bc7a4c9df /internal
parentdc708d5bed57af5b7f7968ab1845519d8458fc7f (diff)
add support for tunnel egress endpoint sub-TLV
As specified in draft-ietf-idr-tunnel-encaps-22. Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
Diffstat (limited to 'internal')
-rw-r--r--internal/pkg/apiutil/attribute.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/pkg/apiutil/attribute.go b/internal/pkg/apiutil/attribute.go
index 0e4eecae..f6003a6a 100644
--- a/internal/pkg/apiutil/attribute.go
+++ b/internal/pkg/apiutil/attribute.go
@@ -1176,6 +1176,10 @@ func NewTunnelEncapAttributeFromNative(a *bgp.PathAttributeTunnelEncap) *api.Tun
subTlv = &api.TunnelEncapSubTLVColor{
Color: sv.Color,
}
+ case *bgp.TunnelEncapSubTLVEgressEndpoint:
+ subTlv = &api.TunnelEncapSubTLVEgressEndpoint{
+ Address: sv.Address.String(),
+ }
case *bgp.TunnelEncapSubTLVUDPDestPort:
subTlv = &api.TunnelEncapSubTLVUDPDestPort{
Port: uint32(sv.UDPDestPort),
@@ -1662,6 +1666,8 @@ func unmarshalAttribute(an *any.Any) (bgp.PathAttributeInterface, error) {
subTlv = bgp.NewTunnelEncapSubTLVProtocol(uint16(sv.Protocol))
case *api.TunnelEncapSubTLVColor:
subTlv = bgp.NewTunnelEncapSubTLVColor(sv.Color)
+ case *api.TunnelEncapSubTLVEgressEndpoint:
+ subTlv = bgp.NewTunnelEncapSubTLVEgressEndpoint(sv.Address)
case *api.TunnelEncapSubTLVUDPDestPort:
subTlv = bgp.NewTunnelEncapSubTLVUDPDestPort(uint16(sv.Port))
case *api.TunnelEncapSubTLVSRPreference: