The conditional should be checking for gnutls presence.
On openSUSE Tumbleweed without gnutls this gives me:
> ./test-tool/iscsi-test-cu --list|grep -i chap
ALL.iSCSICHAP
ALL.iSCSICHAP.Simple
ALL.iSCSICHAP.Invalid
iSCSI.iSCSICHAP
iSCSI.iSCSICHAP.Simple
iSCSI.iSCSICHAP.Invalid
Install gnutls, rebuild and check for base64 test presence:
> sudo zypper in gnutls-devel
> git clean -fxd .
<rebuild>
> ./test-tool/iscsi-test-cu --list|grep -i chap
ALL.iSCSICHAP
ALL.iSCSICHAP.Simple
ALL.iSCSICHAP.Invalid
ALL.iSCSICHAP.Base64
ALL.iSCSICHAP.Base64Oversize
iSCSI.iSCSICHAP
iSCSI.iSCSICHAP.Simple
iSCSI.iSCSICHAP.Invalid
iSCSI.iSCSICHAP.Base64
iSCSI.iSCSICHAP.Base64Oversize
Signed-off-by: David Disseldorp <ddiss@suse.de>
Some targets such as LIO support base64 encoded CHAP_R values. Test this
by intercepting hex-encoded CHAP_R responses and converting the value to
base64.
This will fail on targets which don't support base64; we should probably
skip the test instead.
base64 encoding is performed using the gnutls_base64_encode2() function,
so the test is only present for gnutls-enabled builds.
Signed-off-by: David Disseldorp <ddiss@suse.de>
libiscsi utilizes a bunch of POSIX threads functions but does
not link against libpthread as it should nor the pkg-config file
properly listing libpthread as a static link time dependency.
this patch adds an non-RFC extenstion to the redirect login response which allows
a target to temporarily redirect not only to a different target address but also to
a different targetname.
This is needed to allow scenarious in active/active storage clusters where each
node had its own targetname, but maps the same volumes behind equal LUN ids.
For this non-RFC behaviour the environment variable LIBISCSI_ALLLOW_TARGETNAME_REDIRECT
has to be set.
Signed-off-by: Peter Lieven <pl@dlhnet.de>
this patch adds a read of VPD page 0x80 (unit serial number) after successful login.
The serial is then validated on secutive reconnects to avoid the accidental mismatch
of LUN ids if some kind of remapping appears between loss of connection and a later
reconnect.
An additional url parameter force_usn is added to enforce the usn right from the beginning.
If not set via url or the new iscsi_set_unit_serial_number function the usn is learned
at the first successful login.
Signed-off-by: Peter Lieven <pl@dlhnet.de>
Only show time stats if clock_gettime(3) is available.
It's actually possible to have clock_gettime(3) and not yet support
CLOCK_MONOTONIC on legacy systems, however on macOS, they all arrived
together in macOS 10.12. Rather than add new configure checks for
CLOCK_MONOTONIC, I opted to use the existing HAVE_CLOCK_GETTIME.
When queueing the first PDU to an idle socket, immediately try to write
it to the socket instead of waiting for the event-loop to
timeout/notice there is work to do.
Various other small bugfixes.
Signed-off-by: sahlberg <sahlberg@r10-0-1.rocky10.sahlberg>
Fixing a potential fall-through in switch in data unmarshal function
for maintenance-in commands. The fall-through never happens for valid
commands, but the build tools may complain about it.