GNOME Bugzilla – Bug 767055
Allow listening on IPv4/IPv6 for the same socket
Last modified: 2016-05-31 13:11:37 UTC
Under Linux, unless the socket is set to IPV6_V6ONLY, listening to 0.0.0.0 on IPv4 will also listen on the same socket (and port) for IPv6. See: https://lwn.net/SubscriberLink/688462/08fa7baf32c0869b/ This would make it easier for cases like bug 766723, where we want to listen for IPv4 and IPv6 requests on the same port.
I thought bug 766723 was just about the fact that DAAP and DACP use the same port and so you are trying to bind exactly the same port twice, and so IPv4 vs IPv6 doesn't matter at all? What exactly do you think would be happening differently if libsoup wasn't setting IPV6_V6ONLY? IPv6-mapped IPv4 is a bad idea, both for security reasons as described in the LWN article, and because it's not portable.
Note that you *can* listen for both IPv4 and IPv6 on the same port; in fact, with the new SoupServer APIs, you have to pass an option if you *don't* want to do that.
(In reply to Dan Winship from comment #1) > I thought bug 766723 was just about the fact that DAAP and DACP use the same > port and so you are trying to bind exactly the same port twice, and so IPv4 > vs IPv6 doesn't matter at all? You're completely right. I read the article, and thought "hey, this is the same problem". It isn't. > What exactly do you think would be happening differently if libsoup wasn't > setting IPV6_V6ONLY? > > > IPv6-mapped IPv4 is a bad idea, both for security reasons as described in > the LWN article, and because it's not portable. Fair enough.