diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2011-11-03 08:46:07 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2011-11-10 17:57:06 -0500 |
commit | 3acc84739dd5d746840f881ad4d60bd2a428f1dd (patch) | |
tree | a93db24c1b59dc077dcd1b69407e5bc7e71d11b0 /crypto/ablkcipher.c | |
parent | fb223c32b4d3ee593c8dce07e983680d06abe387 (diff) |
crypto: algapi - Fix build problem with NET disabled
The report functions use NLA_PUT so we need to ensure that NET
is enabled.
Reported-by: Luis Henriques <henrix@camandro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ablkcipher.c')
-rw-r--r-- | crypto/ablkcipher.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c index a816f24f2d52..a0f768c1d9aa 100644 --- a/crypto/ablkcipher.c +++ b/crypto/ablkcipher.c | |||
@@ -383,6 +383,7 @@ static int crypto_init_ablkcipher_ops(struct crypto_tfm *tfm, u32 type, | |||
383 | return 0; | 383 | return 0; |
384 | } | 384 | } |
385 | 385 | ||
386 | #ifdef CONFIG_NET | ||
386 | static int crypto_ablkcipher_report(struct sk_buff *skb, struct crypto_alg *alg) | 387 | static int crypto_ablkcipher_report(struct sk_buff *skb, struct crypto_alg *alg) |
387 | { | 388 | { |
388 | struct crypto_report_blkcipher rblkcipher; | 389 | struct crypto_report_blkcipher rblkcipher; |
@@ -404,6 +405,12 @@ static int crypto_ablkcipher_report(struct sk_buff *skb, struct crypto_alg *alg) | |||
404 | nla_put_failure: | 405 | nla_put_failure: |
405 | return -EMSGSIZE; | 406 | return -EMSGSIZE; |
406 | } | 407 | } |
408 | #else | ||
409 | static int crypto_ablkcipher_report(struct sk_buff *skb, struct crypto_alg *alg) | ||
410 | { | ||
411 | return -ENOSYS; | ||
412 | } | ||
413 | #endif | ||
407 | 414 | ||
408 | static void crypto_ablkcipher_show(struct seq_file *m, struct crypto_alg *alg) | 415 | static void crypto_ablkcipher_show(struct seq_file *m, struct crypto_alg *alg) |
409 | __attribute__ ((unused)); | 416 | __attribute__ ((unused)); |
@@ -457,6 +464,7 @@ static int crypto_init_givcipher_ops(struct crypto_tfm *tfm, u32 type, | |||
457 | return 0; | 464 | return 0; |
458 | } | 465 | } |
459 | 466 | ||
467 | #ifdef CONFIG_NET | ||
460 | static int crypto_givcipher_report(struct sk_buff *skb, struct crypto_alg *alg) | 468 | static int crypto_givcipher_report(struct sk_buff *skb, struct crypto_alg *alg) |
461 | { | 469 | { |
462 | struct crypto_report_blkcipher rblkcipher; | 470 | struct crypto_report_blkcipher rblkcipher; |
@@ -478,6 +486,12 @@ static int crypto_givcipher_report(struct sk_buff *skb, struct crypto_alg *alg) | |||
478 | nla_put_failure: | 486 | nla_put_failure: |
479 | return -EMSGSIZE; | 487 | return -EMSGSIZE; |
480 | } | 488 | } |
489 | #else | ||
490 | static int crypto_givcipher_report(struct sk_buff *skb, struct crypto_alg *alg) | ||
491 | { | ||
492 | return -ENOSYS; | ||
493 | } | ||
494 | #endif | ||
481 | 495 | ||
482 | static void crypto_givcipher_show(struct seq_file *m, struct crypto_alg *alg) | 496 | static void crypto_givcipher_show(struct seq_file *m, struct crypto_alg *alg) |
483 | __attribute__ ((unused)); | 497 | __attribute__ ((unused)); |