Add URL arguments to enable/disable header digest
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
1
README
1
README
@@ -41,6 +41,7 @@ Arguments:
|
|||||||
Username and password for bidirectional CHAP authentication:
|
Username and password for bidirectional CHAP authentication:
|
||||||
target_user=<account>
|
target_user=<account>
|
||||||
target_password=<password>
|
target_password=<password>
|
||||||
|
header_digest=<crc32c|none>
|
||||||
Transport:
|
Transport:
|
||||||
iser
|
iser
|
||||||
|
|
||||||
|
|||||||
13
lib/init.c
13
lib/init.c
@@ -571,6 +571,19 @@ iscsi_parse_url(struct iscsi_context *iscsi, const char *url, int full)
|
|||||||
if (value != NULL) {
|
if (value != NULL) {
|
||||||
*value++ = 0;
|
*value++ = 0;
|
||||||
}
|
}
|
||||||
|
if (!strcmp(key, "header_digest")) {
|
||||||
|
if (!strcmp(value, "crc32c")) {
|
||||||
|
iscsi_set_header_digest(
|
||||||
|
iscsi, ISCSI_HEADER_DIGEST_CRC32C);
|
||||||
|
} else if (!strcmp(value, "none")) {
|
||||||
|
iscsi_set_header_digest(
|
||||||
|
iscsi, ISCSI_HEADER_DIGEST_NONE);
|
||||||
|
} else {
|
||||||
|
iscsi_set_error(iscsi,
|
||||||
|
"Invalid URL argument for header_digest: %s", value);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!strcmp(key, "target_user")) {
|
if (!strcmp(key, "target_user")) {
|
||||||
target_user = value;
|
target_user = value;
|
||||||
} else if (!strcmp(key, "target_password")) {
|
} else if (!strcmp(key, "target_password")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user