From: Steven Allen Date: Wed, 15 Oct 2014 17:59:21 +0000 (-0700) Subject: iscsi-target: return the correct port in SendTargets X-Git-Tag: v5.15~16615^2~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2774f430ea65fddc068865d364bb254d2816648;p=platform%2Fkernel%2Flinux-starfive.git iscsi-target: return the correct port in SendTargets The fact that a target is published on the any address has no bearing on which port(s) it is published. SendTargets should always send the portal's port, not the port used for discovery. Signed-off-by: Steven Allen Signed-off-by: Nicholas Bellinger --- diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index b19e432..73e58d2 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -3491,7 +3491,7 @@ iscsit_build_sendtargets_response(struct iscsi_cmd *cmd, len = sprintf(buf, "TargetAddress=" "%s:%hu,%hu", inaddr_any ? conn->local_ip : np->np_ip, - inaddr_any ? conn->local_port : np->np_port, + np->np_port, tpg->tpgt); len += 1;