Index: sys/dev/ocs_fc/ocs_fabric.c =================================================================== --- sys/dev/ocs_fc/ocs_fabric.c +++ sys/dev/ocs_fc/ocs_fabric.c @@ -232,6 +232,18 @@ sport->display_name); ocs_assert(node->els_req_cnt, NULL); node->els_req_cnt--; + if (node->sport->domain->attached) { + node_printf(node, "Domain already attached\n"); + if (node->sport->p2p_winner) { + node_printf(node, "p2p winner, domain already attached\n"); + ocs_node_post_event(node, OCS_EVT_DOMAIN_ATTACH_OK, NULL); + } else { + node_printf(node, "peer p2p winner, shutdown node\n"); + node->shutdown_reason = OCS_NODE_SHUTDOWN_DEFAULT; + ocs_fabric_initiate_shutdown(node); + } + break; + } ocs_sm_post_event(&sport->sm, OCS_EVT_SHUTDOWN, NULL); break; }