summaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/apiutil/attribute.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/pkg/apiutil/attribute.go')
-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 19060932..0262c59d 100644
--- a/internal/pkg/apiutil/attribute.go
+++ b/internal/pkg/apiutil/attribute.go
@@ -1168,6 +1168,10 @@ func NewTunnelEncapAttributeFromNative(a *bgp.PathAttributeTunnelEncap) *api.Tun
Key: sv.Key,
Cookie: sv.Cookie,
}
+ case *bgp.TunnelEncapSubTLVWireguard:
+ subTlv = &api.TunnelEncapSubTLVWireguard{
+ Peer: sv.Peer,
+ }
case *bgp.TunnelEncapSubTLVProtocol:
subTlv = &api.TunnelEncapSubTLVProtocol{
Protocol: uint32(sv.Protocol),
@@ -1662,6 +1666,8 @@ func unmarshalAttribute(an *any.Any) (bgp.PathAttributeInterface, error) {
switch sv := subValue.Message.(type) {
case *api.TunnelEncapSubTLVEncapsulation:
subTlv = bgp.NewTunnelEncapSubTLVEncapsulation(sv.Key, sv.Cookie)
+ case *api.TunnelEncapSubTLVWireguard:
+ subTlv = bgp.NewTunnelEncapSubTLVWireguard(sv.Peer)
case *api.TunnelEncapSubTLVProtocol:
subTlv = bgp.NewTunnelEncapSubTLVProtocol(uint16(sv.Protocol))
case *api.TunnelEncapSubTLVColor: