Skip to content
This repository was archived by the owner on May 4, 2018. It is now read-only.
This repository was archived by the owner on May 4, 2018. It is now read-only.

Failure to bind UDP sockets on Ubuntu Saucy #870

@cjdelisle

Description

@cjdelisle

In Ubuntu Saucy, SO_REUSEPORT is defined but the kernel doesn't support it causing setsocketopt() to fail with ENOPROTOOPT and aborting uv_bind(). This is currently breaking cjdns tests on saucy. https://code.launchpad.net/~calebdelisle/+archive/cjdns/

Even after Ubuntu upgrades to kernel 3.9 there are still going to be the realtime kernels and the 2.6.x kernels to contend with.

Here's the offending code:
https://github.com/joyent/libuv/blob/master/src/unix/udp.c#L317

We could:

  1. Treat ENOPROTOOPT as a non-error which makes some sense if we want forward compatibility and would be critical for smoothly implementing linux: set SO_REUSEPORT on listen sockets #747
  2. Remove the calls entirely because they only appear in UDP code where in my mind they don't make much sense.
  3. Change the ifdef to an if defined(SO_REUSEPORT) && !defined(linux)

Personally I'm up in the air between 1 and 2 but I'm leaning toward 2.

WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions