]> err.no Git - linux-2.6/commitdiff
[SCSI] qla2xxx: Add a filter to compare port_name against the physical on vport creation.
authorSeokmann Ju <seokmann.ju@qlogic.com>
Thu, 17 Jan 2008 17:02:14 +0000 (09:02 -0800)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 23 Jan 2008 17:29:32 +0000 (11:29 -0600)
During vport creation, there was a possibility to get create a
vport with same port_name as pport.  A new filter has added to
compare given port_name with the port_name of the pport.

Signed-Off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/qla2xxx/qla_mid.c

index 325bdab119032a055f688c372931fa709fcfa520..dea37689b7d407c65eb9adfb42be6813c1854f92 100644 (file)
@@ -341,6 +341,8 @@ qla24xx_vport_create_req_sanity_check(struct fc_vport *fc_vport)
 
        /* Check up unique WWPN */
        u64_to_wwn(fc_vport->port_name, port_name);
+       if (!memcmp(port_name, ha->port_name, WWN_SIZE))
+               return VPCERR_BAD_WWN;
        vha = qla24xx_find_vhost_by_name(ha, port_name);
        if (vha)
                return VPCERR_BAD_WWN;