diff mbox series

[net-next] tipc: discard MSG_CRYPTO msgs when key_exchange_enabled is not set

Message ID 30b1e3d5fb5d00c4200837107d26f445fd3a958f.1639162240.git.lucien.xin@gmail.com (mailing list archive)
State Accepted
Commit 6180c780e64ceb8dd23345b586dfa70c0a1536ee
Delegated to: Netdev Maintainers
Headers show
Series [net-next] tipc: discard MSG_CRYPTO msgs when key_exchange_enabled is not set | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Xin Long Dec. 10, 2021, 6:50 p.m. UTC
When key_exchange is disabled, there is no reason to accept MSG_CRYPTO
msgs if it doesn't send MSG_CRYPTO msgs.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Jon Maloy <jmaloy@redhat.com>
---
 net/tipc/link.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Dec. 13, 2021, 12:40 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri, 10 Dec 2021 13:50:40 -0500 you wrote:
> When key_exchange is disabled, there is no reason to accept MSG_CRYPTO
> msgs if it doesn't send MSG_CRYPTO msgs.
> 
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
> Acked-by: Jon Maloy <jmaloy@redhat.com>
> ---
>  net/tipc/link.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] tipc: discard MSG_CRYPTO msgs when key_exchange_enabled is not set
    https://git.kernel.org/netdev/net-next/c/6180c780e64c

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/tipc/link.c b/net/tipc/link.c
index 09ae8448f394..8d9e09f48f4c 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1298,7 +1298,8 @@  static bool tipc_data_input(struct tipc_link *l, struct sk_buff *skb,
 		return false;
 #ifdef CONFIG_TIPC_CRYPTO
 	case MSG_CRYPTO:
-		if (TIPC_SKB_CB(skb)->decrypted) {
+		if (sysctl_tipc_key_exchange_enabled &&
+		    TIPC_SKB_CB(skb)->decrypted) {
 			tipc_crypto_msg_rcv(l->net, skb);
 			return true;
 		}