Blame SOURCES/libiscsi-iscsi-ls-skip-link-local-IPv6-addresses.patch

a66d21
From ef6a90973cae8b047bdcbc3fcf14206efc98955a Mon Sep 17 00:00:00 2001
a66d21
From: Paolo Bonzini <pbonzini@redhat.com>
a66d21
Date: Thu, 7 Apr 2016 13:33:15 +0200
a66d21
Subject: [PATCH 2/2] iscsi-ls: skip link-local IPv6 addresses
a66d21
a66d21
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
a66d21
Message-id: <1460035995-9887-3-git-send-email-pbonzini@redhat.com>
a66d21
Patchwork-id: 69978
a66d21
O-Subject: [RHEL7.3 libiscsi PATCH 2/2] iscsi-ls: skip link-local IPv6 addresses
a66d21
Bugzilla: 1266523
a66d21
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
a66d21
RH-Acked-by: Thomas Huth <thuth@redhat.com>
a66d21
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
a66d21
a66d21
Some iSCSI targets provide a link-local IPv6 address as a portal, but that
a66d21
is unusable without knowing the interface (aka scope-id) to use for the
a66d21
connection.  This causes iscsi-ls to report an EINVAL and exit.  Just
a66d21
skip the error.
a66d21
a66d21
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
a66d21
(cherry picked from commit d84ee65eaad902bb41fa6bae1f8127e03cb63506)
a66d21
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
a66d21
---
a66d21
 src/iscsi-ls.c | 5 +++++
a66d21
 1 file changed, 5 insertions(+)
a66d21
a66d21
diff --git a/src/iscsi-ls.c b/src/iscsi-ls.c
a66d21
index 10b0e8d..d11806c 100644
a66d21
--- a/src/iscsi-ls.c
a66d21
+++ b/src/iscsi-ls.c
a66d21
@@ -156,6 +156,11 @@ void list_luns(struct client_state *clnt, const char *target, const char *portal
a66d21
 	int full_report_size;
a66d21
 	int i;
a66d21
 
a66d21
+	if (strncasecmp(portal, "[fe80:", 6) == 0) {
a66d21
+		fprintf(stderr, "skipping link-local address\n");
a66d21
+		return;
a66d21
+	}
a66d21
+
a66d21
 	iscsi = iscsi_create_context(initiator);
a66d21
 	if (iscsi == NULL) {
a66d21
 		printf("Failed to create context\n");
a66d21
-- 
a66d21
1.8.3.1
a66d21