iscsi-ls: skip link-local IPv6 addresses
Some iSCSI targets provide a link-local IPv6 address as a portal, but that is unusable without knowing the interface (aka scope-id) to use for the connection. This causes iscsi-ls to report an EINVAL and exit. Just skip the error. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@@ -174,6 +174,11 @@ void list_luns(struct client_state *clnt, const char *target, const char *portal
|
||||
int full_report_size;
|
||||
int i;
|
||||
|
||||
if (strncasecmp(portal, "[fe80:", 6) == 0) {
|
||||
fprintf(stderr, "skipping link-local address\n");
|
||||
return;
|
||||
}
|
||||
|
||||
iscsi = iscsi_create_context(initiator);
|
||||
if (iscsi == NULL) {
|
||||
printf("Failed to create context\n");
|
||||
|
||||
Reference in New Issue
Block a user