Skip to content

Commit f2774f4

Browse files
Steven AllenNicholas Bellinger
authored andcommitted
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 <steven.allen@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
1 parent ab8edab commit f2774f4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/target/iscsi/iscsi_target.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3491,7 +3491,7 @@ iscsit_build_sendtargets_response(struct iscsi_cmd *cmd,
34913491
len = sprintf(buf, "TargetAddress="
34923492
"%s:%hu,%hu",
34933493
inaddr_any ? conn->local_ip : np->np_ip,
3494-
inaddr_any ? conn->local_port : np->np_port,
3494+
np->np_port,
34953495
tpg->tpgt);
34963496
len += 1;
34973497

0 commit comments

Comments
 (0)