summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctld
Commit message (Collapse)AuthorAgeFilesLines
* MFC r281163: Make ctld to not exit on ECONNABORTED on accept().mav2015-04-131-1/+4
| | | | That is not really an error for the main process.
* MFC 281084jpaetzel2015-04-071-1/+1
| | | | | | | | | | 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
* Merge an applicable subset of r263234 from HEAD to stable/10:rwatson2015-03-191-1/+1
| | | | | | | | | | | | | 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.
* MFC r279591: Add example configuration for FibreChannel ports.mav2015-03-111-6/+8
|
* MFC r279590: If target name starts with "naa.", set it as WWNN for CTL port.mav2015-03-111-1/+13
|
* MFC r279589: Fix handling of queued text and logout requests.mav2015-03-111-0/+4
| | | | | While it may have little sense, text and logout requests can be queued. If they are, they consume cmdsn, so we should increment our conn_cmdsn.
* MFC r279276: Add checks for malloc() failures.mav2015-03-011-0/+5
| | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
* MFC r279277: Fix memory leak on incorrect initiator portal.mav2015-03-011-0/+1
| | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
* MFC r278594: Add missing asprintf() status checks.mav2015-02-201-2/+8
|
* MFC r278354: Teach ctld(8) to control non-iSCSI CTL ports.mav2015-02-206-72/+257
| | | | | | | | | | | | | | | 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.
* MFC r278322: Add support for multiple portal groups per target.mav2015-02-197-111/+279
| | | | | | | | | | 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.
* MFC r278161: Bring some more order into iSCSI portal group tags support.mav2015-02-193-10/+16
| | | | | | | 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.
* MFC r278037: CTL LUN mapping rewrite.mav2015-02-195-305/+358
| | | | | | | | | | | | | | | | | | | 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.
* MFC r274853:mav2015-02-192-1/+12
| | | | | | | | | | 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.
* MFC r274804:mav2015-02-191-10/+10
| | | | | | | | | 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.
* MFC r274791:trasz2015-01-261-3/+22
| | | | | | | | | | | | 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
* MFC r275864: Make sequence numbers checks more strict.mav2015-01-032-9/+9
| | | | | | | | 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.
* MFC r274954:trasz2015-01-011-3/+1
| | | | | | | 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
* MFC r275925: Slightly polish iSCSI parameters negotiation.mav2014-12-261-1/+1
|
* MFC r275452: Do not corrupt the listen string when parsing it.mav2014-12-101-5/+7
| | | | | This fixes problem with ctld reload when it is configured to listen on two portals with same IP, but different ports.
* MFC r274310:trasz2014-12-091-1/+6
| | | | | | Add HISTORY section to ctld(8). Sponsored by: The FreeBSD Foundation
* MFC r274308:trasz2014-12-096-7/+183
| | | | | | | | | | | 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
* MFC r274277:trasz2014-12-081-2/+2
| | | | | | ctld(8) doesn't require -lcam or -lssl; remove those from DPADD and LDADD. Sponsored by: The FreeBSD Foundation
* MFC r274248: Remove unused assignments, noticed by Clang analyzer.mav2014-12-051-7/+7
|
* MFC r274278:trasz2014-11-291-4/+5
| | | | | | Improve wording in ctl.conf(5). Sponsored by: The FreeBSD Foundation
* MFC r273822:trasz2014-11-291-0/+1
| | | | | | | Fix iscsictl(8) and ctld(8) to correctly handle Windows newlines (CRLF) in iscsi.conf and ctl.conf. Sponsored by: The FreeBSD Foundation
* MFC r273821:trasz2014-11-291-3/+3
| | | | | | Keep the token list sorted. Sponsored by: The FreeBSD Foundation
* MFC r273820:trasz2014-11-292-1/+12
| | | | | | | | | | | Make it possible to optionally use semicolon to separate statements. This makes it possible to format stuff like this: target xxx { lun 0 { path /foo/bar; size 4G; } } Sponsored by: The FreeBSD Foundation
* MFC r273816:trasz2014-11-293-47/+21
| | | | | | Simplify code; no functional changes. Sponsored by: The FreeBSD Foundation
* MFC r273813:trasz2014-11-297-8/+193
| | | | | | Add discovery-filter. This makes it possible to restrict which targets are returned during discovery based on initiator portal, name, and CHAP credentials.
* MFC r273770:trasz2014-11-271-13/+27
| | | | | | Fix build after previous commit. While here, improve error messages. Sponsored by: The FreeBSD Foundation
* MFC r273768:trasz2014-11-272-30/+59
| | | | | | | | | | Remove the distinction between strings and numbers from ctld(8) yacc parser. This fixes problems with passing strings that look like numbers to clauses that expect strings; previously it caused syntax errors and had to be worked by user, using quotes. The workaround introduced in r267833 is no longer neccessary. Sponsored by: The FreeBSD Foundation
* MFC r273585:trasz2014-11-241-10/+17
| | | | | | Improve ctld.conf example. Sponsored by: The FreeBSD Foundation
* MFC r273470:trasz2014-11-241-4/+4
| | | | | | Fix ctl.conf example to use proper paths to ZVOLs. Sponsored by: The FreeBSD Foundation
* MFC r273467:trasz2014-11-241-4/+4
| | | | | | Comment out parts about iSER; it's not implemented. Sponsored by: The FreeBSD Foundation
* MFC r273584:trasz2014-11-243-20/+36
| | | | | | Make the initiator-name and initiator-portal checks a little nicer. Sponsored by: The FreeBSD Foundation
* MFC 273583:trasz2014-11-241-11/+11
| | | | | | Tidy up the login code; no functional changes. Sponsored by: The FreeBSD Foundation
* MFC r273635, r273793, r274797: Add basic iSNS client to the iSCSI target.mav2014-11-248-46/+761
| | | | | | | | | | | This makes ctld(8) register its iSCSI targets and portals on configured iSNS servers to allow initiators find them without active discovery. Fetching of allowed initiators from iSNS is not implemented now, so target ACLs still should be configured manually. Relnotes: Yes Sponsored by: iXsystems, Inc.
* MFC r274328:mav2014-11-231-1/+50
| | | | | | | Make both iSCSI initiator and target support base64 encoded CHAP data. While all tested initiators and targets use hex-encoded CHAP data, RFC also allows base64 encoding there, and Microsoft certificaition tool uses it.
* MFC r273543:trasz2014-11-221-9/+8
| | | | | | Clean up (refactor) discovery a little; no functional changes. Sponsored by: The FreeBSD Foundation
* MFC r273468:trasz2014-11-221-8/+2
| | | | | | Remove misleading statement. Bump date. Sponsored by: The FreeBSD Foundation
* MFC r273466:trasz2014-11-221-1/+0
| | | | | | Remove spurious empty line. Sponsored by: The FreeBSD Foundation
* MFC r273465:trasz2014-11-221-6/+15
| | | | | | | Fix ctld(8) to not show the "auth-group <name> not assigned to any target" warning for auth-groups assigned to a portal-group. Sponsored by: The FreeBSD Foundation
* MFC r273464:trasz2014-11-225-14/+14
| | | | | | Whitespace fixes. Sponsored by: The FreeBSD Foundation
* MFC r271320:trasz2014-11-221-22/+4
| | | | | | Use keys_add_int() where appropriate. No functional changes. Sponsored by: The FreeBSD Foundation
* MFC r273459:trasz2014-11-224-200/+444
| | | | | | | Untangle iSCSI authentication code by splitting off the CHAP implementation. Sponsored by: The FreeBSD Foundation
* MFC r272911:mav2014-10-201-22/+30
| | | | | | | | Make ctld start even if some LUNs are unable to open backing storage. Such LUNs will be visible to initiators, but return "not ready" status on media access commands. If backing storage become available later, `ctladm modify ...` or `service ctld reload` can trigger its reopen.
* MFC r271797: Make kernel to update LUN size from the backing storagemav2014-09-211-1/+2
| | | | | | | | | on configuration reload also if that size was not specified in the new configuration. Previously it happened only if size was explicitly changed in config. Approved by: re (delphij)
* MFC r271571:trasz2014-09-181-2/+3
| | | | | | | Fix two small nits in ctl.conf(5). Approved by: re (glebius) Sponsored by: The FreeBSD Foundation
* MFC r271445,r271446,r271560:allanjude2014-09-181-121/+191
| | | | | | | | | | Improve markup and language throughout the ctl.conf man page MFC r271543: Add the new iscsi(4) man page Cross reference it from iscsid(8) and iscsictl(8) Approved by: re (gjb), bcr (mentor)
OpenPOWER on IntegriCloud