Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iscsi-scst: Add link_local parameter #228

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

bmeagherix
Copy link
Contributor

Add a link_local parameter to control whether an IPv6 SendTargets response includes link local addresses. The default is to preserve the existing behavior and include them.


There could be several reasons why including link local addresses might not be desirable, incl:

  • They are not routable
  • Currently open-iscsi has a bug whereby a link-local addresses included in SendTargets response may break the handling on the client, preventing discovery from working even if global IPv6 addresses are also available. This will manifest if the response includes a zone-index naming an interface that is not available on the client.

Wrt the latter: over the years there have been various attempts to have this addressed from various directions (e.g. in Ubuntu #380663 or open-iscsi #150), but since a satisfactory fix is not yet upstream, add link_local parameter to allow the issue to be avoided.

FYI, here's the failing scst/open-iscsi interaction:

root@debian:~# iscsiadm -m discovery -t st -p fd37:beef:cafe::1
iscsiadm: Cannot resolve host fe80::f208:aa1a:e598:c5f3%enp0s9. getaddrinfo error: [Name or service not known]
iscsiadm: cannot resolve fe80::f208:aa1a:e598:c5f3%enp0s9
iscsiadm: failed to add default portal, ignoring target iqn.2005-10.org.freenas.ctl:test1
iscsiadm: failed to add target record
[fd37:beef:cafe::1]:3260,1 iqn.2005-10.org.freenas.ctl:test1
[fe80::50f3:e6fb:8b2e:cbd8%enp0s8]:3260,1 iqn.2005-10.org.freenas.ctl:test1

and again when link_local is set to 0

root@debian:~# iscsiadm -m discovery -t st -p fd37:beef:cafe::1
[fd37:beef:cafe::1]:3260,1 iqn.2005-10.org.freenas.ctl:test1
[fd37:beef:cafe::1]:3260,1 iqn.2005-10.org.freenas.ctl:test2

I didn't want to change the existing behavior by default (e.g. by changing the default value of link_local, or by just always removing the link local addresses) in case the client issues are resolved in a future release.

Add a link_local parameter to control whether an IPv6 SendTargets
response includes link local addresses.  The default is to preserve
the existing behavior and include them.
@lnocturno lnocturno merged commit 659c7a7 into SCST-project:master Apr 22, 2024
3 checks passed
@lnocturno
Copy link
Contributor

Hi Brian,

Thank you for the patch!

Thanks,
Gleb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants