lkml.org 
[lkml]   [2020]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH net-next 15/17] rxrpc: Organise connection security to use a union
From
Date
On Mon, 2020-11-23 at 20:11 +0000, David Howells wrote:
> Organise the security information in the rxrpc_connection struct to use a
> union to allow for different data for different security classes.

Is there a known future purpose to this?

> diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h

> @@ -448,9 +448,15 @@ struct rxrpc_connection {
>   struct list_head proc_link; /* link in procfs list */
>   struct list_head link; /* link in master connection list */
>   struct sk_buff_head rx_queue; /* received conn-level packets */
> +
>   const struct rxrpc_security *security; /* applied security module */
> - struct crypto_sync_skcipher *cipher; /* encryption handle */
> - struct rxrpc_crypt csum_iv; /* packet checksum base */
> + union {
> + struct {
> + struct crypto_sync_skcipher *cipher; /* encryption handle */
> + struct rxrpc_crypt csum_iv; /* packet checksum base */
> + u32 nonce; /* response re-use preventer */
> + } rxkad;
> + };

It seems no other follow-on patch in the series uses this nameless union.

\
 
 \ /
  Last update: 2020-11-23 21:28    [W:0.128 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site