From bb3fa4613e91c445ff1b2f5037c400036082e152 Mon Sep 17 00:00:00 2001 From: denis-tingaikin Date: Mon, 22 Jul 2024 21:20:02 +0300 Subject: [PATCH] tmp fix for tap deleting Signed-off-by: denis-tingaikin --- pkg/networkservice/mechanisms/kernel/kerneltap/common.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/networkservice/mechanisms/kernel/kerneltap/common.go b/pkg/networkservice/mechanisms/kernel/kerneltap/common.go index 2dc43aec..73938850 100644 --- a/pkg/networkservice/mechanisms/kernel/kerneltap/common.go +++ b/pkg/networkservice/mechanisms/kernel/kerneltap/common.go @@ -147,6 +147,9 @@ func del(ctx context.Context, conn *networkservice.Connection, vppConn api.Conne return nil } now := time.Now() + var cancel func() + ctx, cancel = context.WithTimeout(context.Background(), time.Minute) + defer cancel() _, err := tapv2.NewServiceClient(vppConn).TapDeleteV2(ctx, &tapv2.TapDeleteV2{ SwIfIndex: swIfIndex, })