26 Commits

Author SHA1 Message Date
trasz
93b5034aa6 MFC r271366 (by mav@):
Fix memory leak, reported by Coverity.
2014-11-29 16:07:15 +00:00
mav
8ef35bbcf8 MFC r274328:
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.
2014-11-23 04:17:39 +00:00
trasz
38906efd97 MFC r273464:
Whitespace fixes.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:50:14 +00:00
trasz
071ca148ac MFC r273459:
Untangle iSCSI authentication code by splitting off the CHAP
implementation.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:39:39 +00:00
allanjude
ddfed1e4ee MFC r271445,r271446,r271560:
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)
2014-09-18 03:02:00 +00:00
trasz
312a175bda MFC r271437:
Don't blindly assume the target agreed to transition to Full Feature Phase;
if we got a Login Response PDU without the "T" bit set, try again with
an empty request.  This fixes interoperability with COMSTAR.

Reviewed by:	mav
Tested by:	mav
Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2014-09-17 08:47:58 +00:00
ngie
07418221f6 MFC r270146:
Add LIBCRYPTO and LIBSSL to DPADD

  This fixes "make checkdpadd"

  Phabric: D621
  PR: 192761
  Approved by: rpaulo (mentor)
2014-09-01 03:04:59 +00:00
trasz
bd6edcc077 MFC r270279:
Make the iSCSI stack use __FBSDID() properly.

Sponsored by:	The FreeBSD Foundation
2014-08-31 20:21:08 +00:00
mav
70c3d88292 MFC r267612 (by trasz):
Get rid of unneccessary argument.
2014-07-24 15:42:32 +00:00
mav
26b69cce3d MFC r267609 (by trasz):
Improve code a little; no functional changes.
2014-07-24 15:41:16 +00:00
mav
15ff7e1d3a MFC r267608 (by trasz):
Use proper term in debug messages.
2014-07-24 15:38:49 +00:00
mav
0a10281b81 MFC r266169 (by trasz):
Remove unused variable.
2014-07-24 15:37:31 +00:00
mav
65d6dfa894 MFC r267613 (by trasz):
Implement redirection handling in initiator.
2014-07-24 15:31:45 +00:00
mav
e6aad79578 MFC r268326:
Make iSCSI initiator keep Initiator Session ID (ISID) across reconnects.

Previously ISID was changed every time, that made impossible correct
persistent reservation, because reconnected session was identified as
completely new one.
2014-07-15 18:21:26 +00:00
trasz
721f1b951c MFC r264604:
Remove redundant code.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:57:53 +00:00
trasz
c8af11f514 MFC r264549:
Make it possible for the initiator side to operate in both proxy
and normal mode; this makes it possible to compile with the former
by default, but use it only when neccessary.  That's especially
important for the userland part.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:56:36 +00:00
trasz
2e120a0184 MFC r261748:
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 iscsid(8) zombies disappear.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:15:54 +00:00
trasz
222c71033f MFC r261747:
Empty data segment during Login Phase is rather unlikely, but it's not
a protocol error.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:14:36 +00:00
trasz
80217e6e6e MFC r261715:
The log_whatever() routines don't accept NULL for format strings,
so mark them as __printflike instead of __printf0like.

Sponsored by:	The FreeBSD Foundation
2014-03-06 11:13:26 +00:00
trasz
10f8f061ad Plug memory leak.
Coverity CID:	1087991
Approved by:	re (gjb)
Sponsored by:	FreeBSD Foundation
2013-10-09 13:48:08 +00:00
trasz
751ffd6b5a Fix memory overrun.
Coverity CID:	1092478
Approved by:	re (gjb)
Sponsored by:	FreeBSD Foundation
2013-10-09 13:45:07 +00:00
trasz
84d8bf623b Fix several problems in the new iSCSI stack; this includes interoperability
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
2013-09-18 21:15:21 +00:00
trasz
2320759748 Make iscsictl(8) automatically try to load the iscsi module. While here,
improve module loading in iscsid(8) and ctld(8).

Approved by:	re (delphij)
2013-09-18 08:37:14 +00:00
trasz
8e562bbcba Improve iSCSI address resolution, fixing "InitiatorAddress" handling,
and error reporting.

Approved by:	re (kib)
2013-09-17 14:23:15 +00:00
joel
44f767ab70 Minor mdoc fixes.
Approved by:	re (blanket)
2013-09-14 21:43:18 +00:00
trasz
a992abf041 Bring in the new iSCSI target and initiator.
Reviewed by:	ken (parts)
Approved by:	re (delphij)
Sponsored by:	FreeBSD Foundation
2013-09-14 15:29:06 +00:00