Contributed by merdely on from the ipv6-will-save-the-world dept.
Recently, Marc Balmer (mbalmer@) committed an update to OpenBSD's Apache implementation to enable IPv6:
Add support for IPv6 while keeping the default at IPv4 to not break existing installations. See the documentation for the IPv6 related configuration. This changes the module ABI since addresses are now struct addrinfo. This has been tested by many people and run on production machines for several months.
Details about integrating IPv6 into httpd(8) from Marc below.
Marc explains how the IPv6 integration came about and what its impact was:
The IPv6 support for httpd originally comes from KAME. Todd Fries (todd@) had it lying around and provided me with it. I brushed it up a bit and installed in on several machines to make sure it works correctly.
IPv6 support for httpd changed the module ABI [Application Binary Interface], since IPv6 addresses take up more space in memory that IPv4 addresses. This meant that I had to check all modules that we have in base (KAME fixed some of them) and also in ports. I converted all modules to the new ABI and I hope that I did not forget one...
Also the webalizer port that we had did not support logfiles with IPv6 addresses in it, so we switched that to an extended version that supports IPv6 addresses.
He goes on to explain the impact of this update on IPv4 support and what users can expect:
IPv6 programs usually are programmed in an address family independent way, which means they will use IPv6 or IPv4 addresses. Often IPv6 is preferred over IPv4. Many programs have -4 and -6 command line switches to restrict them to the use of IPv4 or IPv6 addresses only.
With httpd we did it slightly different: The default behaviour is to use the IPv4 address family only. There is a command line switch to use IPv6 by default for ambiguous directives like "BindAddress *", but by default httpd should just behave like it did before. We wanted to avoid the situation where httpd listens on IPv6 addresses after an update without the sysadmin being aware of it. That was also the main issue with all this: Introducing support for IPv6 without breaking IPv4.
So an IPv4 user can just go on as usual, an IPv6 user can use IPv6 addresses in the httpd.conf file where usually IPv4 addresses have been used.
A README.IPv6 has been created with more information.
A handful of standard modules included in base were updated: mod_proxy, mod_ssl, mod_access, mod_unique_id and mod_usertrack. In addition to the webalizer port, mod_perl, mod_security and mod_scgi were updated to handle the changes in httpd.
Thank you to all of the developers that worked to bring IPv6 to OpenBSD's httpd. And thank you, Marc, for sharing the details.
(Comments are closed)