Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1591836 > unrolled thread

[xfrm] xfrm: Added the auth and enc update support in "state update"

Started bytrajaraman@mvista.com
First post2017-03-03 11:30 +0100
Last post2017-03-07 11:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [xfrm] xfrm: Added the auth and enc update support in "state update" trajaraman@mvista.com - 2017-03-03 11:30 +0100
    Re: [xfrm] xfrm: Added the auth and enc update support in "state  update" Steffen Klassert <steffen.klassert@secunet.com> - 2017-03-07 11:40 +0100

#1591836 — [xfrm] xfrm: Added the auth and enc update support in "state update"

Fromtrajaraman@mvista.com
Date2017-03-03 11:30 +0100
Subject[xfrm] xfrm: Added the auth and enc update support in "state update"
Message-ID<tgSDg-8hC-5@gated-at.bofh.it>
From: Thiruvadi rajaraman <trajaraman@mvista.com>

Updated the xfrm state update process to update the
Authendication and Encryption keys.

Signed-off-by: Thiruvadi rajaraman <trajaraman@mvista.com>
---
 net/xfrm/xfrm_state.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 419bf5d..6b15447 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1388,6 +1388,12 @@ int xfrm_state_update(struct xfrm_state *x)
 		memcpy(&x1->lft, &x->lft, sizeof(x1->lft));
 		x1->km.dying = 0;
 
+		/* To update Authendication and Encryption keys */
+		x1->aalg = kmemdup(x->aalg, xfrm_alg_auth_len(x->aalg),
+								GFP_KERNEL);
+		x1->ealg = kmemdup(x->ealg, xfrm_alg_len(x->ealg),
+								GFP_KERNEL);
+
 		tasklet_hrtimer_start(&x1->mtimer, ktime_set(1, 0), HRTIMER_MODE_REL);
 		if (x1->curlft.use_time)
 			xfrm_state_check_expire(x1);
-- 
1.9.1

[toc] | [next] | [standalone]


#1594096 — Re: [xfrm] xfrm: Added the auth and enc update support in "state update"

FromSteffen Klassert <steffen.klassert@secunet.com>
Date2017-03-07 11:40 +0100
SubjectRe: [xfrm] xfrm: Added the auth and enc update support in "state update"
Message-ID<tikH8-6ao-27@gated-at.bofh.it>
In reply to#1591836
On Fri, Mar 03, 2017 at 03:53:39PM +0530, trajaraman@mvista.com wrote:
> From: Thiruvadi rajaraman <trajaraman@mvista.com>
> 
> Updated the xfrm state update process to update the
> Authendication and Encryption keys.
> 
> Signed-off-by: Thiruvadi rajaraman <trajaraman@mvista.com>
> ---
>  net/xfrm/xfrm_state.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
> index 419bf5d..6b15447 100644
> --- a/net/xfrm/xfrm_state.c
> +++ b/net/xfrm/xfrm_state.c
> @@ -1388,6 +1388,12 @@ int xfrm_state_update(struct xfrm_state *x)
>  		memcpy(&x1->lft, &x->lft, sizeof(x1->lft));
>  		x1->km.dying = 0;
>  
> +		/* To update Authendication and Encryption keys */
> +		x1->aalg = kmemdup(x->aalg, xfrm_alg_auth_len(x->aalg),
> +								GFP_KERNEL);
> +		x1->ealg = kmemdup(x->ealg, xfrm_alg_len(x->ealg),
> +								GFP_KERNEL);

Please explain why you need this and which bug it fixes.
Please write this into the commit message. The commit
message should explain why this change is needed in the
first place. Also please align you patch to common coding
style.

Thanks!

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web