numam-spdk/lib/iscsi
Jim Harris 7d1db86f54 iscsi: properly handle partial keys
This includes properly detecting when a key's name
extends past the end of the valid data.

Note that the unit tests were using sizeof() instead
of strlen() since some of the strings contain
NULL characters.  This means that we should be
subtracting one to account for the implicit null
character at the end of the string.  Note that the
iSCSI spec only says that the key/value pair has to
end with a null character - a key/value pair that
is split across two PDUs will not have a NULL character
at the end of the first PDU.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie95d6dd3b9ffa6a3902a31771ac4edb482418cce

Reviewed-on: https://review.gerrithub.io/c/442450
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-01-29 17:44:12 +00:00
..
acceptor.c thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
acceptor.h iscsi: login poller per portal and portal cache 2017-10-06 17:00:45 -04:00
conn.c iscsi: Fix conflict by destructing connection and logout timeout 2019-01-17 07:05:07 +00:00
conn.h iscsi: Make names of CHAP parameters consistent 2018-12-31 06:35:44 +00:00
init_grp.c iscsi: check the length of initiator/target name 2018-11-21 00:55:55 +00:00
init_grp.h iscsi: Use not C++ style comments // but C-style comments /* */ 2018-10-31 22:01:47 +00:00
iscsi_rpc.c iscsi/rpc: free partially decoded request 2019-01-09 14:13:58 +00:00
iscsi_subsystem.c iscsi: Use 4KiB alignment for data buffers 2019-01-17 05:03:54 +00:00
iscsi.c iscsi: remove ExpStatSN check 2019-01-28 02:33:50 +00:00
iscsi.h iscsi: Fix uncorrect LUN reset called when exiting connection. 2018-12-11 16:37:55 +00:00
Makefile mk: add framework for defining inter-lib dependencies 2018-11-01 21:25:55 +00:00
md5.c astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
md5.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
param.c iscsi: properly handle partial keys 2019-01-29 17:44:12 +00:00
param.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
portal_grp.c iscsi: Fix two bugs of JSON config dump 2018-05-17 23:06:11 +00:00
portal_grp.h iscsi: Use not C++ style comments // but C-style comments /* */ 2018-10-31 22:01:47 +00:00
task.c scsi, iscsi: move task->parent to iSCSI task 2018-01-05 00:01:37 -05:00
task.h iscsi: Propagate SCSI error status to split SCSI read/write commands 2018-12-11 16:37:55 +00:00
tgt_node.c iscsi: Fix uncorrect LUN reset called when exiting connection. 2018-12-11 16:37:55 +00:00
tgt_node.h iscsi: Add set_iscsi_target_node_auth RPC to configure CHAP dynamically 2018-08-22 22:39:26 +00:00