lizaifang / yubico-yubiserve

Automatically exported from code.google.com/p/yubico-yubiserve
GNU General Public License v3.0
1 stars 0 forks source link

yubiserve fails to listen on IPv6 address #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In yubiserve.cfg, change yubiserveHOST from 0.0.0.0 to ::
2. Start the server

What is the expected output? What do you see instead?

Expect: yubiserve.py runs and IPv6 HTTP connections on port 8000 are accepted.

Actual:

    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib/python2.6/SocketServer.py", line 413, in server_bind
    self.socket.bind(self.server_address)
  File "<string>", line 1, in bind
socket.gaierror: [Errno -9] Address family for hostname not supported

server fails to run.

What version of the product are you using? On what operating system?

3.1, on Linux

Please provide any additional information below.

SocketServer.TCPServer doesn't use getaddrinfo() on the listening address to 
get the correct socket type and address family. You can hack yubiserve to 
listen for IPv6 connections by adding a class variable address_family = 
socket.AF_INET6 to BaseHTTPServer, but then it won't work with IPv4 anymore.

Original issue reported on code.google.com by van...@gmail.com on 6 Mar 2012 at 5:47

GoogleCodeExporter commented 9 years ago

Original comment by b1ga...@gmail.com on 4 May 2012 at 9:32