* [PATCH] xfrm: fix xfrm_do_migrate() with AEAD e.g(AES-GCM)
@ 2017-12-07 20:54 Antony Antony
2017-12-08 6:45 ` Steffen Klassert
0 siblings, 1 reply; 2+ messages in thread
From: Antony Antony @ 2017-12-07 20:54 UTC (permalink / raw)
To: Steffen Klassert, Herbert Xu; +Cc: netdev, David S . Miller, Antony Antony
copy geniv when cloning the xfrm state.
x->geniv was not copied to the new state and migration would fail.
xfrm_do_migrate
..
xfrm_state_clone()
..
..
esp_init_aead()
crypto_alloc_aead()
crypto_alloc_tfm()
crypto_find_alg() return EAGAIN and failed
Signed-off-by: Antony Antony <antony@phenome.org>
---
net/xfrm/xfrm_state.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 065d89606888..500b3391f474 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1343,6 +1343,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig,
if (orig->aead) {
x->aead = xfrm_algo_aead_clone(orig->aead);
+ x->geniv = orig->geniv;
if (!x->aead)
goto error;
}
--
2.13.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfrm: fix xfrm_do_migrate() with AEAD e.g(AES-GCM)
2017-12-07 20:54 [PATCH] xfrm: fix xfrm_do_migrate() with AEAD e.g(AES-GCM) Antony Antony
@ 2017-12-08 6:45 ` Steffen Klassert
0 siblings, 0 replies; 2+ messages in thread
From: Steffen Klassert @ 2017-12-08 6:45 UTC (permalink / raw)
To: Antony Antony; +Cc: Herbert Xu, netdev, David S . Miller
On Thu, Dec 07, 2017 at 09:54:27PM +0100, Antony Antony wrote:
> copy geniv when cloning the xfrm state.
>
> x->geniv was not copied to the new state and migration would fail.
>
> xfrm_do_migrate
> ..
> xfrm_state_clone()
> ..
> ..
> esp_init_aead()
> crypto_alloc_aead()
> crypto_alloc_tfm()
> crypto_find_alg() return EAGAIN and failed
>
> Signed-off-by: Antony Antony <antony@phenome.org>
Patch applied, thanks Antony!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-08 6:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07 20:54 [PATCH] xfrm: fix xfrm_do_migrate() with AEAD e.g(AES-GCM) Antony Antony
2017-12-08 6:45 ` Steffen Klassert
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.