Log iSCSI session reinstatements.

False session reinstatements can be result of misconfiguration, when
several initiators use the same initiator name and ISID.
This commit is contained in:
Alexander Motin 2015-09-21 13:25:29 +00:00
parent 7af7c754e4
commit 8153ec9ad5

View File

@ -1611,6 +1611,16 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi *ci)
if (cs2 != cs && cs2->cs_tasks_aborted == false &&
cs->cs_target == cs2->cs_target &&
strcmp(cs->cs_initiator_id, cs2->cs_initiator_id) == 0) {
if (strcmp(cs->cs_initiator_addr,
cs2->cs_initiator_addr) != 0) {
CFISCSI_SESSION_WARN(cs2,
"session reinstatement from "
"different address %s",
cs->cs_initiator_addr);
} else {
CFISCSI_SESSION_DEBUG(cs2,
"session reinstatement");
}
cfiscsi_session_terminate(cs2);
mtx_unlock(&softc->lock);
pause("cfiscsi_reinstate", 1);