OpenBSD 4.4 gnutls-serv IPv6 Only Bug

Joe Orton joe at manyfish.co.uk
Fri Apr 17 21:23:32 CEST 2009


On Fri, Apr 17, 2009 at 05:08:21PM +0200, Simon Josefsson wrote:
> Peter Hendrickson <pdh at wiredyne.com> writes:
> 
> > Using GnuTLS 2.6.5 under OpenBSD 4.4, there is a bug in gnutls-serv.
> > It only listens for connection on an IPv6 port and ignores all IPv4
> > requests.  This can be seen by running something as simple as
> > "gnutls-serv --http".  The patch below illustrates the problem and
> > supplies a quick fix.
> 
> Hi.  Thanks for the report.  I'm not sure the patch is the right thing,
> supporting only IPv4 seems like a step backwards.  Isn't there a way to
> listen on all address families?

Yes, but it's somewhat complicated, you have to create a socket for each 
returned addrinfo structure, bind them all, set them non-blocking, and 
then poll across them to wait for a connection, and cope with the edge 
cases with v6-mapped IPv4 addresses which make it not that simple.

joe





More information about the Gnutls-devel mailing list