*** src/main/http_main.c.orig Fri Jul 13 00:36:35 2001 --- src/main/http_main.c Fri Jul 13 01:28:14 2001 *************** *** 3335,3340 **** --- 3335,3359 ---- exit(1); } + /* USAGI needs IPV6_V6ONLY socket option to bind a port only + * IPv6. + * This code is tested under Linux 2.2.19+USAGI 20010709 SNAP. + * 2001.07.13. NISHI Takao + */ + #ifdef INET6 + if(server->sa_family==AF_INET6){ + int on=1; + if (setsockopt(s,IPPROTO_IPV6,IPV6_V6ONLY, + (char *)&on,sizeof(on))==-1){ + ap_log_error(APLOG_MARK, APLOG_CRIT, server_conf, + "make_sock: failed to set a socket option for %s", addr); + close(s); + ap_unblock_alarms(); + exit(1); + } + } + #endif + /* Solaris (probably versions 2.4, 2.5, and 2.5.1 with various levels * of tcp patches) has some really weird bugs where if you dup the * socket now it breaks things across SIGHUP restarts. It'll either