]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
scsi: target: iscsi: Fix np_ip_proto and np_sock_type in iscsit_setup_np
authortangwenji <tang.wenji@zte.com.cn>
Wed, 13 Mar 2019 14:56:38 +0000 (22:56 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 21 Mar 2019 00:36:39 +0000 (20:36 -0400)
In the switch, np_ip_proto and np_sock_type set different values according
to np_network_transport, and then uniformly assign values, so the previous
values are overwritten.

Signed-off-by: tangwenji <tang.wenji@zte.com.cn>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/iscsi/iscsi_target_login.c

index ae3209efd0e04ba95c0c4569c7b66400665d3207..c526e665f022886f9ce3af78bb3d60b85cefdc1a 100644 (file)
@@ -883,9 +883,6 @@ int iscsit_setup_np(
                return -EINVAL;
        }
 
-       np->np_ip_proto = IPPROTO_TCP;
-       np->np_sock_type = SOCK_STREAM;
-
        ret = sock_create(sockaddr->ss_family, np->np_sock_type,
                        np->np_ip_proto, &sock);
        if (ret < 0) {