u-root / iscsinl

Go iSCSI initiator netlink library
BSD 3-Clause "New" or "Revised" License
16 stars 6 forks source link

Refactor Login sequence #12

Open jlowellwofford opened 3 years ago

jlowellwofford commented 3 years ago

When trying to get this to work with the iSCSI target provided by RHEL8, I found three issues with the Login sequence:

  1. we re-transmit parameters. this is an RFC violation (and some targets really don't like it);
  2. we don't interpret the three basic param responses. There's a catch for Reject, but not NotUnderstood or Irrelevant. If we get a NotUnderstood we generally try to decode it as, say, an Int, and fail (note: we get lots of NotUnderstoods due to 1);
  3. we have no mechanism to handle requests the target makes of us, which can cause login to fail for trivial reasons.

I handled these three by:

With these changes, I was able to mount a RHEL8 target.