[DRBD-cvs] svn commit by lars - r2689 - in trunk: drbd user - hmac
support may be compiled as a module...
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Mon Jan 15 09:13:07 CET 2007
Author: lars
Date: 2007-01-15 09:13:05 +0100 (Mon, 15 Jan 2007)
New Revision: 2689
Modified:
trunk/drbd/drbd_nl.c
trunk/drbd/drbd_receiver.c
trunk/user/drbdsetup.c
Log:
hmac support may be compiled as a module...
Modified: trunk/drbd/drbd_nl.c
===================================================================
--- trunk/drbd/drbd_nl.c 2007-01-15 08:11:06 UTC (rev 2688)
+++ trunk/drbd/drbd_nl.c 2007-01-15 08:13:05 UTC (rev 2689)
@@ -1052,7 +1052,8 @@
if( new_conf->cram_hmac_alg[0] != 0) {
snprintf(hmac_name,HMAC_NAME_L,"hmac(%s)",new_conf->cram_hmac_alg);
tfm = crypto_alloc_hash(hmac_name, 0, CRYPTO_ALG_ASYNC);
- if (tfm == NULL) {
+ if (IS_ERR(tfm)) {
+ tfm = NULL;
retcode=CRAMAlgNotAvail;
goto fail;
}
Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c 2007-01-15 08:11:06 UTC (rev 2688)
+++ trunk/drbd/drbd_receiver.c 2007-01-15 08:13:05 UTC (rev 2689)
@@ -2894,7 +2894,7 @@
return 0;
}
-#ifndef CONFIG_CRYPTO_HMAC
+#if !defined(CONFIG_CRYPTO_HMAC) && !defined(CONFIG_CRYPTO_HMAC_MODULE)
STATIC int drbd_do_auth(drbd_dev *mdev)
{
ERR( "This kernel was build without CONFIG_CRYPTO_HMAC.\n");
@@ -3030,7 +3030,7 @@
rv = ! memcmp(response,right_response,resp_size);
if(rv) {
- INFO("Peer authenticated usind %d bytes of '%s' HMAC\n",
+ INFO("Peer authenticated using %d bytes of '%s' HMAC\n",
resp_size,mdev->net_conf->cram_hmac_alg);
}
Modified: trunk/user/drbdsetup.c
===================================================================
--- trunk/user/drbdsetup.c 2007-01-15 08:11:06 UTC (rev 2688)
+++ trunk/user/drbdsetup.c 2007-01-15 08:13:05 UTC (rev 2689)
@@ -359,8 +359,8 @@
EM(MDIOError) = "IO error(s) orruced during initial access to meta-data.\n",
EM(MDInvalid) = "No valid meta-data signature found.\n)"
"Use 'drbdadm create-md res' to initialize meta-data area.\n",
- EM(CRAMAlgNotAvail) = "The 'cram-hmac-alg' you specified is not known in )"
- "the kernel.\n",
+ EM(CRAMAlgNotAvail) = "The 'cram-hmac-alg' you specified is not known in "
+ "the kernel. (maybe you need to modprobe it, or modprobe hmac?)\n",
EM(CRAMAlgNotDigest) = "The 'cram-hmac-alg' you specified is not a digest.",
EM(KMallocFailed) = "kmalloc() failed. Out of memory?",
EM(DiscardNotAllowed) = "--discard-my-data not allowed when primary.",
More information about the drbd-cvs
mailing list