diff --git a/pkg/networkservice/mechanisms/vxlan/client.go b/pkg/networkservice/mechanisms/vxlan/client.go index c08c7fc8..f53da26b 100644 --- a/pkg/networkservice/mechanisms/vxlan/client.go +++ b/pkg/networkservice/mechanisms/vxlan/client.go @@ -24,6 +24,8 @@ import ( "github.com/golang/protobuf/ptypes/empty" "github.com/networkservicemesh/sdk/pkg/networkservice/core/chain" + "github.com/networkservicemesh/sdk-vpp/pkg/networkservice/mechanisms/vxlan/vxlanacl" + "github.com/networkservicemesh/api/pkg/api/networkservice" "github.com/networkservicemesh/api/pkg/api/networkservice/mechanisms/cls" "github.com/networkservicemesh/api/pkg/api/networkservice/payload" @@ -49,6 +51,7 @@ func NewClient(vppConn api.Connection, tunnelIP net.IP) networkservice.NetworkSe &vxlanClient{ vppConn: vppConn, }, + vxlanacl.NewClient(vppConn), mtu.NewClient(vppConn, tunnelIP), vni.NewClient(tunnelIP), ) diff --git a/pkg/networkservice/mechanisms/vxlan/server.go b/pkg/networkservice/mechanisms/vxlan/server.go index f1b53304..457276c8 100644 --- a/pkg/networkservice/mechanisms/vxlan/server.go +++ b/pkg/networkservice/mechanisms/vxlan/server.go @@ -25,6 +25,8 @@ import ( "github.com/networkservicemesh/sdk/pkg/networkservice/core/chain" "github.com/networkservicemesh/sdk/pkg/networkservice/core/next" + "github.com/networkservicemesh/sdk-vpp/pkg/networkservice/mechanisms/vxlan/vxlanacl" + "github.com/networkservicemesh/sdk/pkg/networkservice/utils/metadata" "github.com/networkservicemesh/api/pkg/api/networkservice/payload" @@ -45,6 +47,7 @@ func NewServer(vppConn api.Connection, tunnelIP net.IP) networkservice.NetworkSe return chain.NewNetworkServiceServer( vni.NewServer(tunnelIP), mtu.NewServer(vppConn, tunnelIP), + vxlanacl.NewServer(vppConn), &vxlanServer{ vppConn: vppConn, }, diff --git a/pkg/networkservice/mechanisms/vxlan/vxlanacl/server.go b/pkg/networkservice/mechanisms/vxlan/vxlanacl/server.go index 394f9d7e..9b5fc518 100644 --- a/pkg/networkservice/mechanisms/vxlan/vxlanacl/server.go +++ b/pkg/networkservice/mechanisms/vxlan/vxlanacl/server.go @@ -41,6 +41,10 @@ func NewServer(vppConn api.Connection) networkservice.NetworkServiceServer { } func (v *vxlanACLServer) Request(ctx context.Context, request *networkservice.NetworkServiceRequest) (*networkservice.Connection, error) { + conn, err := next.Server(ctx).Request(ctx, request) + if err != nil { + return nil, err + } if mechanism := vxlan.ToMechanism(request.GetConnection().GetMechanism()); mechanism != nil { if _, ok := v.IPMap.LoadOrStore(mechanism.DstIP().String(), struct{}{}); !ok { if err := create(ctx, v.vppConn, mechanism.DstIP(), aclTag); err != nil { @@ -48,7 +52,7 @@ func (v *vxlanACLServer) Request(ctx context.Context, request *networkservice.Ne } } } - return next.Server(ctx).Request(ctx, request) + return conn, nil } func (v *vxlanACLServer) Close(ctx context.Context, conn *networkservice.Connection) (*empty.Empty, error) {