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

Unable to connect to an IPv6 link local address #568

Open
M-Tarasov opened this issue Aug 14, 2024 · 1 comment
Open

Unable to connect to an IPv6 link local address #568

M-Tarasov opened this issue Aug 14, 2024 · 1 comment

Comments

@M-Tarasov
Copy link
Contributor

A connection to link local address requires the scope ID to be set (e.g. 4 in https://[fe80::abcd:1234:abcd:1234%4]) in the struct sockaddr_in6. However, the symbol HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID is not defined in the curl-sys crate, and the scope_id field is always set to 0.

See cf-socket.c -> socket_open(..):

#if defined(USE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
  if(data->conn->scope_id && (addr->family == AF_INET6)) {
    struct sockaddr_in6 * const sa6 = (void *)&addr->sa_addr;
    sa6->sin6_scope_id = data->conn->scope_id;
  }
#endif
@M-Tarasov
Copy link
Contributor Author

Added pull request #569

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

No branches or pull requests

1 participant