diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2018-08-08 00:58:17 +0000 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-10-19 01:26:17 +0200 |
commit | 51175d2cc2e4a8f7100c0e368ff5dfc64b2ac4a1 (patch) | |
tree | fd7ba8efab93acc4b2fdbe10e2d39003932476a5 /internal/pkg | |
parent | c8e54e7f8a2a49c8c035d5becf33b21fc0babf25 (diff) |
support Wireguard tunnel encapsulation
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
Diffstat (limited to 'internal/pkg')
-rw-r--r-- | internal/pkg/apiutil/attribute.go | 6 |
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: |