erlyaws / yaws

Yaws webserver
https://erlyaws.github.io
BSD 3-Clause "New" or "Revised" License
1.28k stars 268 forks source link

IPv6 support #33

Closed ajxn closed 12 years ago

ajxn commented 14 years ago

I can't find how to make Yaws listen to a IPv6 address and port.

I can have Yaws work with my IPv4 addresses (behind an NAT etc...), but not with a IPv6 address/port. I have asked on Debian mailing list for Erlang, and they say that ejabberd has support for IPv6, but not Yaws.

I run Debian/Lenny (stable) on a NSLU/2 machine.

klacke commented 14 years ago

Hello, This has never been tested. It turns out that the OTP inet module is pretty daft. Whenever an IP v6 address is used to bind, the 'inet6' option must also be passed in the options list. Since the address is an 8 tuple, that code ought to be able to figure this out automagically.

Anyway, I now pass the inet6 param and am able to bind to ::1 at least. Haven't done any ip v6 testing at all though and would be very happy if you could try this out for me.

The commit is:

http://github.com/klacke/yaws/commit/7f2951c412c9657ddcd6c9d5cc174d6111b96c59

Or alternatively if you just do:

git clone git://github.com/klacke/yaws.git

autoconf; ./configure; make local_install

and try it out.

Thanks for reporting

/klacke

klacke commented 12 years ago

this works now,