OpenBSD 4.4 gnutls-serv IPv6 Only Bug
Peter Hendrickson
pdh at wiredyne.com
Fri Apr 17 19:20:45 CEST 2009
> From: Simon Josefsson <simon at josefsson.org>
> 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.
The patch is *not* the right thing -- I just sent it to illustrate the
problem. I agree that IPv6 should be supported -- even advocated.
> Isn't there a way to listen on all address families?
"If both IPv4 and IPv6 traffic need to be accepted, listen on two
sockets."
(According to this man page:
http://www.openbsd.org/cgi-bin/man.cgi?query=inet6&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html)
It looks to me like supporting two open sockets would require
substantial code changes. So, why not just add "--ipv4" and "--ipv6"
switches? If somebody wants to listen for both types of traffic they
can run two processes. (I personally wouldn't object if "--ipv6" were
the default, although that would be pushing the envelope.)
And it should also print a message every time which tells the user
which address family it is listening for. It took me a while to
figure out why it wasn't working -- such a message would have saved me
considerable time.
Peter
More information about the Gnutls-devel
mailing list