summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctld
Commit message (Collapse)AuthorAgeFilesLines
* MFC r268795:mav2014-07-201-2/+5
| | | | Fix ctld crash on startup if target alias is not set.
* MFC r268328:mav2014-07-151-0/+8
| | | | | | | | 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.
* MFC r268302:mav2014-07-153-0/+6
| | | | | | | 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.
* MFC r268293:mav2014-07-151-15/+13
| | | | | | | | | | | | | 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.
* MFC r268291:mav2014-07-153-52/+288
| | | | | | | | | | | | | | | | | 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.
* MFC r267648:mav2014-07-041-2/+2
| | | | | | | 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.
* MFC r267606:mav2014-07-021-4/+47
| | | | | On discovery stage add set of TargetAddress keys to reply, reporting to the client all the portal groups addresses and ports.
* MFC: 267833jpaetzel2014-06-272-2/+16
| | | | | | | | | | 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
* MFC r264877:trasz2014-05-071-9/+9
| | | | | | Style fixes. Sponsored by: The FreeBSD Foundation
* MFC r264535:trasz2014-05-071-3/+3
| | | | | | English. Sponsored by: The FreeBSD Foundation
* MFC r264534:trasz2014-05-071-1/+9
| | | | | | If we fail to create LUN, try again on next configuration reload. Sponsored by: The FreeBSD Foundation
* MFC r264533:trasz2014-05-071-3/+4
| | | | | | Use consistent punctuation. Sponsored by: The FreeBSD Foundation
* MFC r264532:trasz2014-05-071-3/+3
| | | | | | Use proper terminology in debug messages. Sponsored by: The FreeBSD Foundation
* MFC r264531:trasz2014-05-072-10/+13
| | | | | | Constify. Sponsored by: The FreeBSD Foundation
* MFC r264530:trasz2014-05-073-31/+34
| | | | | | Properly pass the initiator address when running in proxy mode. Sponsored by: The FreeBSD Foundation
* MFC r264529:trasz2014-05-071-11/+13
| | | | | | | Use socket address from accept(2) instead of retrieving it via getpeername(2). Sponsored by: The FreeBSD Foundation
* MFC r264528:trasz2014-05-073-8/+16
| | | | | | | | | | | | 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
* MFC r264526:trasz2014-05-073-28/+45
| | | | | | | 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
* MFC r264524:trasz2014-05-073-86/+112
| | | | | | | | 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
* MFC r264500:trasz2014-05-071-7/+6
| | | | | | Stop treating LUN 0 as mandatory. There is no reason to do that. Sponsored by: The FreeBSD Foundation
* MFC r263356:trasz2014-03-251-2/+2
| | | | | | Make the error message more clear. Sponsored by: The FreeBSD Foundation
* MFC r261752:trasz2014-03-253-8/+1
| | | | | | | | 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
* MFC r261751:trasz2014-03-251-4/+4
| | | | | | | The log_whatever() routines don't accept NULL for format strings, so mark them as __printflike instead of__printf0like. Sponsored by: The FreeBSD Foundation
* MFC r261764:trasz2014-03-251-0/+16
| | | | | | | | | 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
* MFC r261763:trasz2014-03-255-11/+15
| | | | | | | 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
* MFC r261762:trasz2014-03-252-4/+7
| | | | | | | | 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
* MFC r261761:trasz2014-03-251-3/+4
| | | | | | Update manual page to match recent auth-group "default" changes. Sponsored by: The FreeBSD Foundation
* MFC r261760:trasz2014-03-252-5/+25
| | | | | | | | 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
* MFC r261759:trasz2014-03-252-3/+26
| | | | | | Make it possible to redefine portal-group "default". Sponsored by: The FreeBSD Foundation
* MFC r261758:trasz2014-03-255-11/+119
| | | | | | Add auth-type. Sponsored by: The FreeBSD Foundation
* MFC r261757:trasz2014-03-256-75/+75
| | | | | | Rename a variable, no functional changes. Sponsored by: The FreeBSD Foundation
* MFC r261756:trasz2014-03-251-49/+49
| | | | | | Yacc cleanup; no functional changes. Sponsored by: The FreeBSD Foundation
* MFC r261755:trasz2014-03-251-120/+120
| | | | | | Make function ordering slightly more logical; no functional changes. Sponsored by: The FreeBSD Foundation
* MFC r261754:trasz2014-03-256-6/+278
| | | | | | Implement initiator-name and initiator-portal restrictions. Sponsored by: The FreeBSD Foundation
* MFC r261753:trasz2014-03-251-8/+9
| | | | | | | | 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
* MFC r261750:trasz2014-03-251-10/+15
| | | | | | | 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
* MFC r261749:trasz2014-03-251-58/+64
| | | | | | Refactor. Sponsored by: The FreeBSD Foundation
* MFC r261768:trasz2014-03-251-3/+3
| | | | | | Make the debug messages during ctld(8) shutdown less confusing. Sponsored by: The FreeBSD Foundation
* MFC r261767:trasz2014-03-251-1/+1
| | | | | | Show proper configuration file line numbers in error messages. Sponsored by: The FreeBSD Foundation
* MFC r261766:trasz2014-03-251-0/+1
| | | | | | Make ctld error out on invalid characters in ctl.conf. Sponsored by: The FreeBSD Foundation
* MFC r261765:trasz2014-03-251-7/+24
| | | | | | Improve error reporting. Sponsored by: The FreeBSD Foundation
* MFC r259182:trasz2013-12-131-0/+8
| | | | | | | | 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
* MFC r258842:trasz2013-12-051-2/+2
| | | | | | | Grammar fix. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
* MFC r258841:trasz2013-12-051-3/+3
| | | | | | | Fix typos. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
* Fix typo.trasz2013-11-141-2/+2
| | | | | Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
* Plug memory leaks.trasz2013-10-091-1/+3
| | | | | | Coverity CID: 1087993, 1087992 Approved by: re (marius) Sponsored by: FreeBSD Foundation
* Fix off-by-one.trasz2013-10-091-1/+1
| | | | | | Coverity CID: 1011375 Approved by: re (glebius) Sponsored by: FreeBSD Foundation
* Fix several problems in the new iSCSI stack; this includes interoperabilitytrasz2013-09-182-8/+6
| | | | | | | | | | | | | fix for LIO (Linux target), removing possibility for the target to avoid mutual CHAP by choosing to skip authentication altogether, and fixing truncated error messages in iscsictl(8) output. This also fixes several of the problems found with Coverity. Note that this change requires world rebuild. Coverity CID: 1088038, 1087998, 1087990, 1088004, 1088044, 1088041, 1088040 Approved by: re (blanket) Sponsored by: FreeBSD Foundation
* Make iscsictl(8) automatically try to load the iscsi module. While here,trasz2013-09-181-1/+1
| | | | | | improve module loading in iscsid(8) and ctld(8). Approved by: re (delphij)
* Minor mdoc fixes.joel2013-09-141-2/+1
| | | | Approved by: re (blanket)
OpenPOWER on IntegriCloud