Commit ccd8a57a authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[NET]: Allow MD5 to be a module

I found that recent 2.6 kernels no longer allowed me to build MD5 as
a module even though everything that used it were modules (including
ipv6 and sctp).  It turns out that there were boolean options
selecting MD5 in the Kconfig files.  Due to limitations in the current
kconfig implementation, this forces MD5 to be a boolean as well.

The usual workaround in these cases is to move the selection up
to the closest tristate.  This is what the following patch does.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 7ecdfc34
...@@ -109,6 +109,8 @@ source "net/ipv4/Kconfig" ...@@ -109,6 +109,8 @@ source "net/ipv4/Kconfig"
config IPV6 config IPV6
tristate "The IPv6 protocol (EXPERIMENTAL)" tristate "The IPv6 protocol (EXPERIMENTAL)"
depends on INET && EXPERIMENTAL depends on INET && EXPERIMENTAL
select CRYPTO if IPV6_PRIVACY
select CRYPTO_MD5 if IPV6_PRIVACY
---help--- ---help---
This is experimental support for the IP version 6 (formerly called This is experimental support for the IP version 6 (formerly called
IPng "IP next generation"). You will still be able to do IPng "IP next generation"). You will still be able to do
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
config IPV6_PRIVACY config IPV6_PRIVACY
bool "IPv6: Privacy Extensions (RFC 3041) support" bool "IPv6: Privacy Extensions (RFC 3041) support"
depends on IPV6 depends on IPV6
select CRYPTO
select CRYPTO_MD5
---help--- ---help---
Privacy Extensions for Stateless Address Autoconfiguration in IPv6 Privacy Extensions for Stateless Address Autoconfiguration in IPv6
support. With this option, additional periodically-alter support. With this option, additional periodically-alter
......
...@@ -8,6 +8,10 @@ menu "SCTP Configuration (EXPERIMENTAL)" ...@@ -8,6 +8,10 @@ menu "SCTP Configuration (EXPERIMENTAL)"
config IP_SCTP config IP_SCTP
tristate "The SCTP Protocol (EXPERIMENTAL)" tristate "The SCTP Protocol (EXPERIMENTAL)"
depends on IPV6 || IPV6=n depends on IPV6 || IPV6=n
select CRYPTO if SCTP_HMAC_SHA1 || SCTP_HMAC_MD5
select CRYPTO_HMAC if SCTP_HMAC_SHA1 || SCTP_HMAC_MD5
select CRYPTO_SHA1 if SCTP_HMAC_SHA1
select CRYPTO_MD5 if SCTP_HMAC_MD5
---help--- ---help---
Stream Control Transmission Protocol Stream Control Transmission Protocol
...@@ -71,18 +75,12 @@ config SCTP_HMAC_NONE ...@@ -71,18 +75,12 @@ config SCTP_HMAC_NONE
config SCTP_HMAC_SHA1 config SCTP_HMAC_SHA1
bool "HMAC-SHA1" bool "HMAC-SHA1"
select CRYPTO
select CRYPTO_HMAC
select CRYPTO_SHA1
help help
Enable the use of HMAC-SHA1 during association establishment. It Enable the use of HMAC-SHA1 during association establishment. It
is advised to use either HMAC-MD5 or HMAC-SHA1. is advised to use either HMAC-MD5 or HMAC-SHA1.
config SCTP_HMAC_MD5 config SCTP_HMAC_MD5
bool "HMAC-MD5" bool "HMAC-MD5"
select CRYPTO
select CRYPTO_HMAC
select CRYPTO_MD5
help help
Enable the use of HMAC-MD5 during association establishment. It is Enable the use of HMAC-MD5 during association establishment. It is
advised to use either HMAC-MD5 or HMAC-SHA1. advised to use either HMAC-MD5 or HMAC-SHA1.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment