Add URL arguments to enable/disable header digest

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2017-02-17 17:58:19 -08:00
parent a1cbd8a2ce
commit b1003dc75a
2 changed files with 14 additions and 0 deletions

1
README
View File

@@ -41,6 +41,7 @@ Arguments:
Username and password for bidirectional CHAP authentication:
target_user=<account>
target_password=<password>
header_digest=<crc32c|none>
Transport:
iser

View File

@@ -571,6 +571,19 @@ iscsi_parse_url(struct iscsi_context *iscsi, const char *url, int full)
if (value != NULL) {
*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")) {
target_user = value;
} else if (!strcmp(key, "target_password")) {