Its idea was to be a simple initiator and execute several commands from
kernel level, but FreeBSD never had consumer for that functionality,
while its implementation polluted many unrelated places.
Make setproctitle(3) work in Capsicum capability mode. This makes
ctld(8) child processes to indicate initiator address and name in
their titles, similar to what iscsid(8) child processes do.
PR: 181352
Sponsored by: The FreeBSD Foundation
Allow '@' in unquoted strings, such as with the "path" statement. Note
that one can use any character they like by using double quotes.
PR: 200895
Sponsored by: The FreeBDS Foundation
Teach ctld about CTL's physical_port and virtual_port fields.
This allows ctld to work with isp(4) virtual ports, specifying them as
isp0/1, isp0/2, etc. There are still problems on isp(4) layer with
disabling those ports after enabling, but hopefully they can be fixed.
Fix thinko/copypaste error.
When checking the length of the mutual secret password the variable for
the secret password was used by mistake. This resulted in ctld never
warning about the length of the mutual secret being wrong even if it was.
Sponsored by: iXsystems
Update most userspace consumers of capability.h to use capsicum.h instead.
auditdistd is not updated as I will make the change upstream and then do a
vendor import sometime in the next week or two.
Note that a significant fraction does not apply, as FreeBSD 10 doesn't
contain a Capsicumised ping, casperd, libcasper, etc. When these features
are merged, the capsicum.h change will need to be merged with them.
Sponsored by: Google, Inc.
This change introduces new target option "port", that assigns current target
to specified CTL port. On config application ctld(8) will apply LUN mapping
according to target configuration to specified port and bring the port up.
On shutdown cltd(8) will remove the mapping and put the port down.
This change allows to configure both iSCSI and FibreChannel targets in the
same configuration file in alike way.
Kernel side support was added earlier at r278037.
Relnotes: yes
Sponsored by: iXsystems, Inc.
This change allows multiple "portal-group" options to be specified per
target. Each of them may include new optional auth-group name parameter
to override per-target auth parameters for specific portal group.
Kernel side support was added earlier at r278161.
Sponsored by: iXsystems, Inc.
While ctld(8) still does not allow multiple portal groups per target
to be configured, kernel should now be able to handle it.
Sponsored by: iXsystems, Inc.
Replace iSCSI-specific LUN mapping mechanism with new one, working for any
ports. By default all ports are created without LUN mapping, exposing all
CTL LUNs as before. But, if needed, LUN mapping can be manually set on
per-port basis via ctladm. For its iSCSI ports ctld does it via ioctl(2).
The next step will be to teach ctld to work with FibreChannel ports also.
Respecting additional flexibility of the new mechanism, ctl.conf now allows
alternative syntax for LUN definition. LUNs can now be defined in global
context, and then referenced from targets by unique name, as needed. It
allows same LUN to be exposed several times via multiple targets.
While there, increase limit for LUNs per target in ctld from 256 to 1024.
Some initiators do not support LUNs above 255, but that is not our problem.
Relnotes: yes
Sponsored by: iXsystems, Inc.
For both iSCSI initiator and target increase socket buffer sizes before
establishing connection.
This is a workaround for Chelsio TOE driver, that does not update socket
buffer size in hardware after connection established, and unless that is
done beforehand, kernel code will stuck, attempting to send/receive full
PDU at once.
In conf_apply() remove iSCSI ports from kernel before removing LUNs.
Previous order confused initiators with messages about "removed" LUNs
during simple ctld restart without any real config change. After this
commit initiators only reestablish lost connection, receive "Power on
occurred" UNIT ATTENTION status and continue normal operation.
Add missing error checking for kernel_port_{add,remove}(). Both can fail
for reasons yet unknown; don't make it increment cumulated_error as a kind
of temporary workaround.
MFC r275399:
Fix null pointer dereference.
Sponsored by: The FreeBSD Foundation
While we don't support MCS, hole in received sequence numbers may mean
only PDU loss. While we don't support lost PDU recovery, terminate the
connection to avoid stuck commands.
While there, improve handling of sequence numbers wrap after 2^32 PDUs.
Remove the pidfile clause from the ctl.conf example. Why do everyone
just copy/paste this line into their configs, it's beyond me.
Sponsored by: The FreeBSD Foundation
Add support for sending redirections to iSCSI target.
MFC r274309:
Fix several nits in redirection handling - don't use wrong CSG,
and avoid use-after-free.
Sponsored by: The FreeBSD Foundation