Spdk/lib/iscsi
Daniel Verkamp 61c1493785 iscsi: disallow netmask prefix of 0 bits
Netmasks with 0 bits of prefix do not make sense.  For example,
192.168.1.2/0 would allow hosts from any address, but this is
indicated with a special "ANY" value rather than a normal netmask.

Netmask prefixes of the full address size (e.g. 32 for IPv4 and 128 for
IPv6) are still allowed, since this represents a valid configuration
that matches a single specific address.

This also allows the IPv4 netmask math to be done entirely in uint32_t
instead of promoting to unsigned long long to avoid undefined behavior
when bits == 0 (shift count would have been 32 in that case).

Change-Id: I021b718e6a46f628c96a358edae816de81cd8929
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/392969
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 12:02:06 -05:00
..
acceptor.c iscsi: Remove nested, duplicated, or unreferenced file inclusion 2017-12-14 11:30:05 -05:00
acceptor.h iscsi: login poller per portal and portal cache 2017-10-06 17:00:45 -04:00
conn.c iscsi: change name of function spdk_iscsi_conn_handle_queued_tasks 2017-12-26 11:13:47 -05:00
conn.h iscsi: Remove nested, duplicated, or unreferenced file inclusion 2017-12-14 11:30:05 -05:00
init_grp.c iscsi: remove errno lookups for allocations 2017-12-29 13:48:29 -05:00
init_grp.h iscsi: make some functions into static 2017-12-21 12:19:44 -05:00
iscsi_rpc.c iscsi: Set cpumask to all available CPUs when PG is created JSON-RPC 2017-12-19 15:22:05 -05:00
iscsi_subsystem.c iscsi: remove errno lookups for allocations 2017-12-29 13:48:29 -05:00
iscsi.c iscsi: remove errno lookups for allocations 2017-12-29 13:48:29 -05:00
iscsi.h iscsi: Remove unused macro constants 2017-12-27 12:49:32 -05:00
Makefile util: add CRC32 utility functions 2017-08-02 19:47:35 -04: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: remove errno lookups for allocations 2017-12-29 13:48:29 -05: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: remove errno lookups for allocations 2017-12-29 13:48:29 -05:00
portal_grp.h iscsi/portal_grp: make some functions into static and remove unused ones 2017-12-26 11:16:47 -05:00
task.c iscsi: let task_pool use spdk_mempool related functions 2017-12-06 17:03:15 -05:00
task.h iscsi: change iscsi_bhs_scsi_req variable names. 2017-07-18 13:14:16 -04:00
tgt_node.c iscsi: disallow netmask prefix of 0 bits 2018-01-03 12:02:06 -05:00
tgt_node.h iscsi: Dynamic reconfiguration of PG-IG maps 2017-12-07 12:28:02 -05:00