Spdk/lib
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
..
bdev virtio: generalize PCI enumerate functions 2017-12-29 16:02:20 -05:00
blob blob: Add read_only opt and spdk_bs_md_set_read_only to blobs. 2018-01-03 12:00:30 -05:00
blobfs blob: change spdk_bs_iter_next parameter to spdk_blob * 2017-12-15 12:28:44 -05:00
conf conf: Remove use of perror() for strdup() failure 2017-12-15 16:13:27 -05:00
copy astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
cunit include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
env_dpdk env: export spdk_env_get_last_core function. 2017-12-23 15:08:24 -05:00
event event: Replace the constant SPDK_MAX_REACTORS to spdk_env_get_last_core() 2017-12-28 12:03:40 -05:00
ioat astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
iscsi iscsi: disallow netmask prefix of 0 bits 2018-01-03 12:02:06 -05:00
json astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
jsonrpc log: rename SPDK_TRACE_* to SPDK_LOG_* 2017-12-07 12:23:19 -05:00
log log: rename SPDK_TRACE_* to SPDK_LOG_* 2017-12-07 12:23:19 -05:00
lvol blob: change spdk_bs_iter_next parameter to spdk_blob * 2017-12-15 12:28:44 -05:00
nbd nbd: place mop-up ioctl to _nbd_stop 2017-12-26 12:09:35 -05:00
net astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
nvme nvme: re-enable the separate metadata support in nvme driver 2017-12-21 13:21:55 -05:00
nvmf nvmf: Add synchronization primitives for subsystems 2018-01-03 11:58:11 -05:00
rocksdb astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
rpc rpc: set g_jsonrpc_server to NULL on close 2017-11-28 16:20:47 -05:00
scsi scsi: convert unmap command to bdev blocks API 2017-12-29 13:43:29 -05:00
trace trace: replace DPDK call with SPDK env.h wrapper 2017-12-12 15:37:05 -05:00
ut_mock test/mock: add pthread_self 2017-09-19 17:15:15 -04:00
util util/crc16: add crc16 library support and unit tests 2017-12-20 15:12:26 -05:00
vhost vhost: fix pthread_create() error handling 2017-12-29 13:48:29 -05:00
virtio virtio: generalize PCI enumerate functions 2017-12-29 16:02:20 -05:00
Makefile virtio: add new library virtio 2017-12-26 13:03:29 -05:00