[iSCSI] Offer CHAP authentication only if we have a username and password origin/HEAD origin/master
authorMichael Brown <mcb30@etherboot.org>
Thu, 24 Apr 2008 12:48:29 +0000 (13:48 +0100)
committerMichael Brown <mcb30@etherboot.org>
Thu, 24 Apr 2008 12:48:29 +0000 (13:48 +0100)
commit00ed567069f50325fb9835746696f5b5e351479a
treeadf5b860e57a069aa01952d7ee4c1ff1392463f0
parenteec9814a0ec3705d4c464b8eaa6a8360685c4ca2
[iSCSI] Offer CHAP authentication only if we have a username and password

Some EMC targets will fail if we advertise that we can authenticate with
CHAP, but the target is configured to allow unauthenticated access to that
target.  We advertise AuthMethod=CHAP,None; the target should (I think)
select AuthMethod=None for unprotected targets.  IETD does this, but an
EMC Celerra NS83 doesn't.

Fix by offering only AuthMethod=None if the user hasn't supplied a
username and password; this means that we won't be offering CHAP
authentication unless the user is expecting to use it (in which case the
target is presumably configured appropriately).

Many thanks to Alessandro Iurlano <alessandro.iurlano@gmail.com> for
reporting and helping to diagnose this problem.
src/net/tcp/iscsi.c