sctp: Change defaults on cookie hmac selection
[firefly-linux-kernel-4.4.55.git] / net / sctp / Kconfig
index a9edd2e205f4eabaeb842ec06406d0e61ec83127..c26210618e14cadca832f933a886a1250f0490db 100644 (file)
@@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
          'cat /proc/net/sctp/sctp_dbg_objcnt'
 
          If unsure, say N
+choice
+       prompt "Default SCTP cookie HMAC encoding"
+       default SCTP_COOKIE_HMAC_MD5
+       help
+         This option sets the default sctp cookie hmac algorithm
+         when in doubt select 'md5'
+
+config SCTP_DEFAULT_COOKIE_HMAC_MD5
+       bool "Enable optional MD5 hmac cookie generation"
+       help
+         Enable optional MD5 hmac based SCTP cookie generation
+       select SCTP_COOKIE_HMAC_MD5
+
+config SCTP_DEFAULT_COOKIE_HMAC_SHA1
+       bool "Enable optional SHA1 hmac cookie generation"
+       help
+         Enable optional SHA1 hmac based SCTP cookie generation
+       select SCTP_COOKIE_HMAC_SHA1
+
+config SCTP_DEFAULT_COOKIE_HMAC_NONE
+       bool "Use no hmac alg in SCTP cookie generation"
+       help
+         Use no hmac algorithm in SCTP cookie generation
+
+endchoice
 
 config SCTP_COOKIE_HMAC_MD5
        bool "Enable optional MD5 hmac cookie generation"
        help
          Enable optional MD5 hmac based SCTP cookie generation
-       default y
        select CRYPTO_HMAC if SCTP_COOKIE_HMAC_MD5
        select CRYPTO_MD5 if SCTP_COOKIE_HMAC_MD5
 
@@ -79,7 +103,6 @@ config SCTP_COOKIE_HMAC_SHA1
        bool "Enable optional SHA1 hmac cookie generation"
        help
          Enable optional SHA1 hmac based SCTP cookie generation
-       default y
        select CRYPTO_HMAC if SCTP_COOKIE_HMAC_SHA1
        select CRYPTO_SHA1 if SCTP_COOKIE_HMAC_SHA1