Skip to content

Fix ipv6 in Windows 10 #153

@hcosmin

Description

@hcosmin

Latest Libstrophe branch fails to connect over ipv6 to a server on Windows 10.

The fix is to replace in sock.c, int sock_connect_error(const sock_t sock) function
struct sockaddr sa; with a struct socketaddr_storage sa.

The issue is that struct sockaddr is not guaranteed to be large enough to hold ipv6 adresses, and indeed it isn't on Windows, so getpeername(...) fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions