Commit Graph

74 Commits

Author SHA1 Message Date
riastradh 3305a62508 libiscsi: Fix types of Time2Wait and Time2Retain in logout decap.
According to https://www.rfc-editor.org/rfc/rfc7143#section-11.15,
these are both 2-byte quantities.  Loading 4-byte quantities and
passing them through ISCSI_NTOHS might have worked by accident on
x86, but it's not gonna fly on big-endian.  (Fortunately sparc64 is
not just big-endian but also strict-alignment so it caught this
problem!)

XXX Is there an upstream for this code?  doc/3RDPARTY doesn't cite
any easily-followed references.

PR port-sparc64/57784

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-12-19 02:16:07 +00:00
mrg 690d517445 log a pointer's value before calling free() on it. avoids technical UB.
found by GCC 12.
2023-08-03 08:00:10 +00:00
lukem c4b7a9e794 bsd.own.mk: rename GCC_NO_* to CC_WNO_*
Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
2023-06-03 09:09:01 +00:00
mrg 031fd7644c remove unset (and always printed as "(null)") gfilename variable. 2021-01-17 00:13:49 +00:00
rin a8c74629f6 Support aarch64eb in */config.guess.
Cherry-picked from upstream:
https://git.savannah.gnu.org/gitweb/?p=config.git;a=commit;h=1c4398015583eb77bc043234f5734be055e64bea

Everything except external/apache2/llvm/dist/llvm/cmake/config.guess
is patched, which is under vendor tag and cannot be modified. I expect
that this file is not actually used as we use hand-crafted version of
configure script instead of cmake for building LLVM.

Note that external/apache2/llvm/autoconf/autoconf/config.guess has
already been committed on Oct. 20, but commit message disappeared as
cvs aborted due to "permission denied" when trying to modify the file
mentioned above. Sorry for confusing you.

Also note that GMP uses its own config.guess Patch for
external/lgpl3/gmp/dist/config.guess is provided by ryo@. Thanks!
2020-11-17 10:35:10 +00:00
christos 7c502affd2 fix null argument 2020-09-06 17:06:20 +00:00
fox f61eb78c70 external/bsd/iscsi: Fix -Werror=maybe-uninitialized error in initiator.c.
Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Submitted by: mlelstv@
Reviewed by: kamil@
2020-03-17 00:57:54 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
christos bfd64f2ac7 grow the buffer. 2019-10-08 20:02:44 +00:00
sevan cc576e1d8e Update supporting files for components which rely on autoconf to allow systems
introducing since release of software to be recognised. This should hopefully
allow the builds to progress a littles further on systems such as the POWER8
which features a little endian 64-bit PowerPC CPU identified as ppc64le.
2017-02-01 09:26:39 +00:00
christos 1870a7f130 need <sys/param.h> 2017-01-13 19:11:16 +00:00
christos ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
joerg 31a77d8abb Drop pointer checks that are always true. 2014-11-15 01:15:45 +00:00
mlelstv 3e107524fa make seek test routine work with the configured block size. 2014-09-30 15:25:18 +00:00
mlelstv a5a0a2d000 the buffer is also used when there is no input 2014-09-30 15:24:15 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
mlelstv 77a7376bce rfc3720 Appendix D. SendTargets Operation requires that requesting
information for all relevant targets is done with the value 'All'
(upper case A) and some implementations require it.
2013-11-01 07:53:34 +00:00
martin 32c67f0c83 PR 48338: fix typo making a boolean expression always true 2013-10-24 19:13:25 +00:00
christos 45b261d12f remove unused variables 2013-10-20 03:10:45 +00:00
wiz a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
njoly d1f2d0ccef Remove unknown \*(tN and \*(sP macros.
ok wiz.
2013-03-28 22:54:25 +00:00
mlelstv 82d607b6ed Treat LUNs as 64bit numbers that they are.
Don't use broken 48bit accesses for ISID either.

This fixes the LUN ghosting problem on big-endian systems.

LUN handling is still incorrect because it assumes a LUN value < 256
and doesn't parse the 64bit LUN for extended formats.
2012-09-29 07:18:21 +00:00
martin b5a8984a94 Define ISCSI_HTONLL6 and ISCSI_NTOHLL6 (6 byte network byte order accessor
macros) dependend on host endianess.
Spotted by mhitch, unfortunately not enough to fix iscsi-target problems
on sparc64.
2012-09-19 08:42:52 +00:00
joerg 93f9555bb0 Add __printflike where needed. Fix various format string issues. 2012-03-15 04:06:54 +00:00
mbalmer b2d484f7cb Fix typos (in comments). 2012-02-17 12:08:12 +00:00
wrstuden 2f786af8b7 Tweak white space so I get my annual commit. 2012-01-01 01:19:20 +00:00
agc 0c1bafa6f0 include inttypes.h to get the fixed size integer types - from Gregor Riepl 2011-12-14 07:20:31 +00:00
cheusov 3e8537647d Fix segfault when read(2) returns -1 2011-11-05 00:17:19 +00:00
wiz 4165ef4b81 Use standard section names. 2011-11-02 20:26:03 +00:00
yamt ed36af787f fix a function prototype 2011-11-02 16:45:00 +00:00
sborrill 91b69c9f1d Bump version number to 20111006 2011-10-06 13:06:14 +00:00
sborrill c8be037fd1 Provide function in libiscsi to return the compile-time limit on number of
targets. Use this function in the initiator, to ensure that the same limit
is used throughout (i.e. stop you attempting to compile the initiator with a
different limit to the library - the initiator uses the library for most of
its functionality).

If truncating the number of targets in the initiator, truncate it to the
correct amount, not half of what it should be.

Obey RFC3720 when determining targets. SendTargets=All MUST be supported
on a discovery session, and MUST NOT be supported on an operational session.
Previously, SendTargets=All was used both in the initial discovery session
and the later session. (from Daisuke Aoyama - author of istgt).
2011-10-06 13:05:28 +00:00
christos e83f416f0e fix strict aliasing issues. 2011-08-17 09:24:23 +00:00
mrg c111245a78 apply some -Wno-error and/or -fno-strict-aliasing.
all of this should be looked at closer, but some of them are not
very trivial.
2011-06-22 02:49:41 +00:00
sborrill d66709fd74 Update HISTORY to show that iscsifs was in NetBSD 5.0 2011-02-22 17:15:55 +00:00
wiz 68b1a98bc8 Markup fix. 2011-02-22 14:23:37 +00:00
sborrill 75f0848d7d Note limitations of CHAP implementation in BUGS section. 2011-02-22 13:17:20 +00:00
sborrill cbedc267b9 Skip target if TargetName is empty.
Use relevant TargetAddress, not just first one we happen to find.

Following improvement based on feedback from Daisuke Aoyama (author of istgt):
Handle NOP-OUT CmdSN and immediate bit.
Handle NOP-IN TransferTag=0xffffffff.
Interim solution for dealing with Underflow bit in iSCSI response.

iscsi-initiator now talks to istgt and other targets.

Remaining issues:
CHAP support will not work with most targets (maximum 16 octet challenge is
used, but other initiators use up to 1024). However, CHAP can now be
bypassed by not specifying a username.
2011-02-22 13:10:55 +00:00
sborrill f7bc64b9db Retry read capacity. Device may not be ready on first access, so need to
wait and re-issue. From Daisuke Aoyama (author of istgt).
2011-02-22 13:04:31 +00:00
sborrill c3d1c80eb5 Release 20110222 2011-02-22 13:00:05 +00:00
sborrill 83d439db6d Skip .orig files 2011-02-22 12:56:50 +00:00
sborrill a96e357c94 Document -D option (discover LUNs).
iscsi-initiator was NOT in NetBSD 5.0.
2011-02-22 10:34:12 +00:00
sborrill ff607cd15b man page claims that you can use auth type = none, but in reality this
didn't work (insisted on a username being given and then used, plus always
advertised CHAP to the target). Make initiator work as advertised (i.e.
defaults to auth type none and so don't require a username).

To use CHAP you should explicitly request CHAP:
iscsi-initiator -a chap -u user -h targetname /mountpoint

For backwards compatibility, if a username is given (-u) and no auth type
is specified (-a), it will default to CHAP, i.e. to use none, just give no
username:
iscsi-initiator -h targetname /mountpoint
2011-02-21 17:48:43 +00:00
sborrill 4fd58d7036 Remove hostname from pathname to storage in mount point.
This means /mnt/mytarget.domain.local/target0/storage is now
/mnt/target0/storage.

Rationale is as follows:
- The hostname used may vary (i.e. name vs FQDN vs IP) which can mess up
  mountpoints (especially across multiple hosts e.g. in a shared xen pool)
- Target name is given in the mount anyway so it is redundant

OK agc@
2011-02-21 17:24:19 +00:00
agc 78b8953550 manual page improvements, from enami tsugutomo, with thanks. 2011-02-20 03:56:36 +00:00
agc ff0d414d6f Make sure we include <inttypes.h> if we have it. From Rumko. 2011-02-09 00:59:23 +00:00
he 44b7889673 Don't depend on shared library dependencies; we also need -lpuffs here.
This allows us to link statically.
2010-09-23 09:40:23 +00:00
sborrill e6b018f13d Add missing -h flag to example 2010-08-03 10:24:39 +00:00
sborrill 57628e87d5 Regen with autoconf-2.63 and automake-1.11.1 because of man page changes.
Bump version to 20100416
2010-04-19 08:09:02 +00:00
sborrill 036951a68c Put .8 man pages in man8, not man1.
Add targets.5 to man5.
2010-04-19 08:05:36 +00:00