net/isboot-kmod works with net/istgt but not with ctld(8)

From: Maurizio Vairani <maurizio1018_at_gmail.com>
Date: Tue, 3 Apr 2018 09:27:27 +0200
I am successfully running a diskless TrueOS, a FreeBSD 12-CURRENT derivate,
desktop with the net/istgt port installed in a FreeBSD 11-RELEASE server. I
am using this setup without any error, but it is a bit slow.

I want to test ctld on my server, but when the diskless PC loads the isboot
driver it loops with a lot of these error messages:

“soreceive BHS is not complete, remaining byte(s)=48

do login failed

soreceive BHS is not complete, remaining byte(s)=48

do login failed”

The source code, of the isboot-kmod driver, that prints the error message
is:

/* BHS */

   flags = MSG_WAITALL;

   uio.uio_resid = ISCSI_BHS_LEN;

   error = soreceive(sess->so, NULL, &uio, &mp, NULL, &flags);

   if (error) {

      ISBOOT_ERROR("soreceive BHS error %d\n", error);

      return (error);

   }

   if (uio.uio_resid != 0) {

      ISBOOT_ERROR("soreceive BHS is not complete, remaining "

          "byte(s)=%d\n", (int) uio.uio_resid);

      return (EIO);

   }

source file: iscsi.c, proc: isboot_recv_pdu()

The ISCSI_BHS_LEN constant is 48 and seems that no bytes are read.

On the server, in /var/log/messages, I can read a lots of messages like:

“Mar 28 16:32:39 clover-nas2 ctld[59634]: 192.168.0.164: protocol error:
received invalid opcode 0x83

Mar 28 16:32:39 clover-nas2 ctld[40784]: child process 59634 terminated
with exit status 1

Mar 28 16:32:40 clover-nas2 ctld[59637]: 192.168.0.164: protocol error:
received invalid opcode 0x83

Mar 28 16:32:40 clover-nas2 ctld[40784]: child process 59637 terminated
with exit status 1”

The isboot driver send an unrecognized opcode 0x83 to the cltd daemon ...,
but I cannot continue, I need some help from the community. :-)

Note: the patch for compiling and running isboot-kmod in FreeBSD 12 is at:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226982

Regards,

Maurizio
Received on Tue Apr 03 2018 - 05:27:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:15 UTC