Commit 651f6d6a authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

lib/iscsi: Return portals only in public portal group for SendTargets



All redirect portals in private portal groups are temporary and so they
should be informed only by temporary login redirection response.

Then this patch changes SendTargets operation to return portals only
in primary portal groups.

Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic62ada749886290df2d1490377cc5ca883b3f47a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3492


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 10d62184
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -310,6 +310,14 @@ iscsi_send_tgt_portals(struct spdk_iscsi_conn *conn,

	TAILQ_FOREACH(pg_map, &target->pg_map_head, tailq) {
		pg = pg_map->pg;

		if (pg->is_private) {
			/* Skip the private portal group. Portals in the private portal group
			 * will be returned only by temporary login redirection responses.
			 */
			continue;
		}

		TAILQ_FOREACH(p, &pg->head, per_pg_tailq) {
			if (alloc_len - total < 1) {
				/* TODO: long text responses support */