XCBC needs to allocate the tfm as CBC mode to use
"xor" function in the tfm.

Signed-off-by: Kazunori MIYAZAWA <[EMAIL PROTECTED]>
---
 crypto/algapi.c         |    2 +-
 include/crypto/algapi.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/crypto/algapi.c b/crypto/algapi.c
index c915300..d3f4bb4 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -396,7 +396,7 @@ struct crypto_tfm *crypto_spawn_tfm(stru
                return ERR_PTR(-EAGAIN);
        }
 
-       tfm = __crypto_alloc_tfm(alg, 0);
+       tfm = __crypto_alloc_tfm(alg, spawn->flags);
        if (IS_ERR(tfm))
                crypto_mod_put(alg);
 
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index 5748aec..fb7f958 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -48,6 +48,7 @@ struct crypto_spawn {
        struct list_head list;
        struct crypto_alg *alg;
        struct crypto_instance *inst;
+       u32 flags;
 };
 
 struct scatter_walk {
-- 
1.4.2
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to