On Tue, Sep 10, 2019 at 12:56 PM Paolo Abeni [off-list ref] wrote:
Hi all,
On Tue, 2019-09-10 at 11:52 -0400, Willem de Bruijn wrote:
quoted
This clearly has some loose ends and is no shorter or simpler. So
unless anyone has comments or a different solution, I'll finish
up the first variant.
I'm sorry for the late feedback.
I was wondering if we could use a new UDP-specific setsockopt to remove
the connected socket from the reuseport group at connect() time?
That would not have any behavioral change for existing application
leveraging the current reuseport implementation and requires possibly a
simpler implementation, but would need application changes for UDP
servers doing reuse/connect().
WDYT?
Thanks for taking a look, too, Paolo.
I looked into detaching the sockets from the group at connect time. It
could be done without setsockopt, even. Unfortunately, it brings other
problems.
The reuseport group is still there, so may still match sockets
before the connection. If the connected socket no longer has
sk_reuseport set, binding new sockets will fail on conflict. And so a
few more.