Skip to content

Connecting to IPv6 address does not work #41

@JKRhb

Description

@JKRhb

When trying to connect to a peer using an IPv6 address like so

dtls.connect({
    type: 'udp6',
    remotePort: 5684,
    remoteAddress: 'fe80::260a:c4ff:feea:20f0'
});

I get the following error:

node:events:356
      throw er; // Unhandled 'error' event
      ^

Error: bind EINVAL 0.0.0.0
    at node:dgram:341:20
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on Socket instance at:
    at node:dgram:343:14
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4071,
  code: 'EINVAL',
  syscall: 'bind',
  address: '0.0.0.0'
}

It seems to me as if the library does not bind to :: in the IPv6 case but uses IPv4's 0.0.0.0 instead.

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