-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qfix: Prevent potential leaks of loopback ifaces on request error #556
qfix: Prevent potential leaks of loopback ifaces on request error #556
Conversation
Signed-off-by: denis-tingaikin <[email protected]>
@@ -56,7 +56,7 @@ func (l *loopbackClient) Request(ctx context.Context, request *networkservice.Ne | |||
if err := createLoopback(ctx, l.vppConn, networkService, l.loopbacks, metadata.IsClient(l)); err != nil { | |||
return nil, err | |||
} | |||
postponeCtxFunc := postpone.Context(ctx) | |||
postponeCtxFunc := postpone.ContextWithValues(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loopback depends on metadata. So we should use context with values.
@@ -53,9 +54,13 @@ func (l *loopbackServer) Request(ctx context.Context, request *networkservice.Ne | |||
if err := createLoopback(ctx, l.vppConn, networkService, l.loopbacks, metadata.IsClient(l)); err != nil { | |||
return nil, err | |||
} | |||
postponeCtxFunc := postpone.ContextWithValues(ctx) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server side doesn't care about context expiration on getting error => added postponeCtxFunc.
…k-vpp@main PR link: networkservicemesh/sdk-vpp#556 Commit: 8ecddc7 Author: Denis Tingaikin Date: 2022-04-13 00:09:01 +0300 Message: - fix potential leaks of loopback chain element (#556) Signed-off-by: NSMBot <[email protected]>
…k-vpp@main PR link: networkservicemesh/sdk-vpp#556 Commit: 8ecddc7 Author: Denis Tingaikin Date: 2022-04-13 00:09:01 +0300 Message: - fix potential leaks of loopback chain element (#556) Signed-off-by: NSMBot <[email protected]>
…k-vpp@main PR link: networkservicemesh/sdk-vpp#556 Commit: 8ecddc7 Author: Denis Tingaikin Date: 2022-04-13 00:09:01 +0300 Message: - fix potential leaks of loopback chain element (#556) Signed-off-by: NSMBot <[email protected]>
…k-vpp@main PR link: networkservicemesh/sdk-vpp#556 Commit: 8ecddc7 Author: Denis Tingaikin Date: 2022-04-13 00:09:01 +0300 Message: - fix potential leaks of loopback chain element (#556) Signed-off-by: NSMBot <[email protected]>
…k-vpp@main PR link: networkservicemesh/sdk-vpp#556 Commit: 8ecddc7 Author: Denis Tingaikin Date: 2022-04-13 00:09:01 +0300 Message: - fix potential leaks of loopback chain element (#556) Signed-off-by: NSMBot <[email protected]>
…k-vpp@main PR link: networkservicemesh/sdk-vpp#556 Commit: 8ecddc7 Author: Denis Tingaikin Date: 2022-04-13 00:09:01 +0300 Message: - fix potential leaks of loopback chain element (#556) Signed-off-by: NSMBot <[email protected]>
…k-vpp@main PR link: networkservicemesh/sdk-vpp#556 Commit: 8ecddc7 Author: Denis Tingaikin Date: 2022-04-13 00:09:01 +0300 Message: - fix potential leaks of loopback chain element (#556) Signed-off-by: NSMBot <[email protected]>
…k-vpp@main PR link: networkservicemesh/sdk-vpp#556 Commit: 8ecddc7 Author: Denis Tingaikin Date: 2022-04-13 00:09:01 +0300 Message: - fix potential leaks of loopback chain element (#556) Signed-off-by: NSMBot <[email protected]>
…k-vpp@main PR link: networkservicemesh/sdk-vpp#556 Commit: 8ecddc7 Author: Denis Tingaikin Date: 2022-04-13 00:09:01 +0300 Message: - fix potential leaks of loopback chain element (#556) Signed-off-by: NSMBot <[email protected]>
…k-vpp@main PR link: networkservicemesh/sdk-vpp#556 Commit: 8ecddc7 Author: Denis Tingaikin Date: 2022-04-13 00:09:01 +0300 Message: - fix potential leaks of loopback chain element (#556) Signed-off-by: NSMBot <[email protected]>
…k-kernel@main PR link: networkservicemesh/sdk-kernel#556 Commit: d38c463 Author: Denis Tingaikin Date: 2023-01-23 11:32:16 +0300 Message: - Merge pull request #556 from wazsone/ci/fix-depricated Signed-off-by: NSMBot <[email protected]>
Signed-off-by: denis-tingaikin [email protected]