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

Subsystems: networking [general], the rest, tipc network layer

STALE1757d REVIEWED: 1 (1M)

1 review trailer (1 from subsystem maintainers).

2 messages, 2 authors, 2021-12-13 · open the first message on its own page

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

From: Xin Long <lucien.xin@gmail.com>
Date: 2021-12-10 18:50:44

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(-)
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;
 		}
-- 
2.27.0

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

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-12-13 12:40:16

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller [off-list ref]:

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help