| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Make the iSCSI stack use __FBSDID() properly.
Sponsored by: The FreeBSD Foundation
|
|
|
|
| |
Add netmasks support to initiator-portal option.
|
|
|
|
|
| |
Correct spelling errors in ctld.8. While here, correct similar errors
in ctl.conf.5 and fix a couple of contractions.
|
|
|
|
| |
Fix ctld crash on startup if target alias is not set.
|
|
|
|
|
|
|
|
| |
Close race in r268291 between port destruction, delayed by sessions
teardown, and new port creation during `service ctld restart`.
Close it by returning iSCSI port internal state, that allows to identify
dying ports, which should not be counted as existing, from really alive.
|
|
|
|
|
|
|
| |
Pass through iSCSI session ISID from LOGIN request to the CTL frontend.
ISID is an important part of initiator transport ID for iSCSI. It is not
used now, but should be to properly implement persistent reservation.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Burry devid port method, which was a gross hack.
Instead make ports provide wanted port and target IDs, and LUNs provide
wanted LUN IDs. After that core Device ID VPD code only had to link all
of them together and add relative port and port group numbers.
LUN ID for iSCSI LUNs no longer created by CTL, but by ctld, and passed
to CTL as "scsiname" LUN option. This makes LUNs to report the same set
of IDs, independently from the port through which it is accessed, as
required by SCSI specifications.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create separate CTL port for every iSCSI target (and maybe portal group).
Having single port for all iSCSI connections makes problematic implementing
some more advanced SCSI functionality in CTL, that require proper ports
enumeration and identification.
This change extends CTL iSCSI API, making ctld daemon to control list of
iSCSI ports in CTL. When new target is defined in config fine, ctld will
create respective port in CTL. When target is removed -- port will be
also removed after all active commands through that port properly aborted.
This change require ctld to be rebuilt to match the kernel.
As a minor side effect, this allows to have iSCSI targets without LUNs.
While that may look odd and not very useful, that is not incorrect.
|
|
|
|
|
|
|
| |
serial_num and device_id fields are not necessarily null-terminated.
Before this it was impossible to use all 16 bytes of serial number, and
client always got serial number NULL-terminated, that is not required.
|
|
|
|
|
| |
On discovery stage add set of TargetAddress keys to reply, reporting to
the client all the portal groups addresses and ports.
|
|
|
|
|
|
|
|
|
|
| |
Fix issues in config parser relating to lun serial numbers.
Without this fix some serial numbers needed to be quoted
to avoid the config parser bailing out.
Submitted by: delphij
Sponsored by: iXsystems
|
|
|
|
|
|
| |
Style fixes.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
English.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
If we fail to create LUN, try again on next configuration reload.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Use consistent punctuation.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Use proper terminology in debug messages.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Constify.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Properly pass the initiator address when running in proxy mode.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
Use socket address from accept(2) instead of retrieving it via
getpeername(2).
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rework the way we enable CTL iSCSI port. Previously conf_apply()
needed it to be already enabled, because listening in proxy mode
requires it; however, it's conf_apply() that opens pidfiles,
so it resulted in port being enabled before pidfile was opened.
This was not so bad, but it was also disabled when pidfile couldn't
be opened due to ctld already running; this means that starting
second ctld instance screwed up the first.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
Properly identify target portal when running in proxy mode. While here,
remove CTL_ISCSI_CLOSE, it wasn't used or implemented anyway.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
| |
Make it possible for the iSCSI target side to operate in both normal
and ICL_KERNEL_PROXY mode, and fix some bit rot so the latter actually
works again.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Stop treating LUN 0 as mandatory. There is no reason to do that.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Make the error message more clear.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
| |
Empty data segment during Login Phase is rather unlikely, but it's
not, by itself, a protocol error. This fixes interoperability with
OpenBSD initiator.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
The log_whatever() routines don't accept NULL for format strings,
so mark them as __printflike instead of__printf0like.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
| |
So, it turns out SIGCHLD is discarded by default, so we have to set up
a dummy handler to make it interrupt an ioctl(2) or select(2).
This makes those short-lived ctld(8) zombies disappear.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
Use new auth-type "deny" instead of using "chap" with no chap entries;
it's cleaner this way, and gives better feedback to the user.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
| |
Use "default" as default discovery-auth-group, instead of "no-access".
It doesn't change visible behaviour, as previously auth-group "default"
wasn't redefinable, so by default access was always denied.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Update manual page to match recent auth-group "default" changes.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
| |
Add a new auth-group "default", defaulting to deny, and make it possible
to redefine it. From now on, assigning auth-group to a target is no longer
mandatory.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Make it possible to redefine portal-group "default".
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Add auth-type.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Rename a variable, no functional changes.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Yacc cleanup; no functional changes.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Make function ordering slightly more logical; no functional changes.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Implement initiator-name and initiator-portal restrictions.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
| |
Daemonize after applying configuration, not before, so that
any problems - including "daemon already running" - are visible
on the terminal and not just in logs.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
Improve check for duplicated paths. It shows the warning twice for every
path (once for each duplicate found), but it should do for now.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Refactor.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Make the debug messages during ctld(8) shutdown less confusing.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Show proper configuration file line numbers in error messages.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Make ctld error out on invalid characters in ctl.conf.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Improve error reporting.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
| |
Fix handling for empty auth-groups. Without it, ctld child process
would either exit on assertion, or, if assertions are not enabled,
fail to authenticate the target.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
Grammar fix.
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
Fix typos.
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
| |
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Coverity CID: 1087993, 1087992
Approved by: re (marius)
Sponsored by: FreeBSD Foundation
|
|
|
|
|
|
| |
Coverity CID: 1011375
Approved by: re (glebius)
Sponsored by: FreeBSD Foundation
|