diff options
author | fredb <fredb> | 2002-08-10 13:43:09 +0000 |
---|---|---|
committer | fredb <fredb> | 2002-08-10 13:43:09 +0000 |
commit | 57ceaed70d7c85a81f8d76714206075f246825b0 (patch) | |
tree | ce26a3824ddc00d1a184d90746e52ed9b575f33c /www/wwwoffle | |
parent | b13a684938f54d7a1b0fe645bcb74d3bbb62f63f (diff) | |
download | pkgsrc-57ceaed70d7c85a81f8d76714206075f246825b0.tar.gz |
Fix PR pkg/17672 a little more portably, with patch suggested by Andrew
M. Bishop (wwwoffle's author/maintainer). With this, if IPv6-mapped IPv6
addresses are enabled, attempting to bind the wildcard address for both
protocols is not a fatal error.
Diffstat (limited to 'www/wwwoffle')
-rw-r--r-- | www/wwwoffle/distinfo | 4 | ||||
-rw-r--r-- | www/wwwoffle/patches/patch-ac | 102 |
2 files changed, 96 insertions, 10 deletions
diff --git a/www/wwwoffle/distinfo b/www/wwwoffle/distinfo index 461f70a26c1..b1ad5ab2ea7 100644 --- a/www/wwwoffle/distinfo +++ b/www/wwwoffle/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.15 2002/08/06 01:58:34 itojun Exp $ +$NetBSD: distinfo,v 1.16 2002/08/10 13:43:09 fredb Exp $ SHA1 (wwwoffle-2.7c.tgz) = 6260ba0f039ad5430f2e9c31d702e3da35b92a44 Size (wwwoffle-2.7c.tgz) = 867164 bytes SHA1 (patch-aa) = 897de385a47826e16a8a09b1bc1c207a2d350f94 SHA1 (patch-ab) = 0dfd322da2bb9750668319132fc9d0a0a4c035dd -SHA1 (patch-ac) = 9cc27a7a751bdcab007ebc82eb9f23140fa8b84b +SHA1 (patch-ac) = 5cfe930c2b6df543ed214f599eda4bab7a1c0a90 diff --git a/www/wwwoffle/patches/patch-ac b/www/wwwoffle/patches/patch-ac index f85b5f9229a..f7d7921cf78 100644 --- a/www/wwwoffle/patches/patch-ac +++ b/www/wwwoffle/patches/patch-ac @@ -1,26 +1,112 @@ -$NetBSD: patch-ac,v 1.5 2002/08/06 01:58:35 itojun Exp $ +$NetBSD: patch-ac,v 1.6 2002/08/10 13:43:09 fredb Exp $ ---- src/wwwoffled.c.orig Sun Jun 23 20:02:35 2002 -+++ src/wwwoffled.c Tue Aug 6 10:53:39 2002 -@@ -292,10 +292,6 @@ - #endif +--- src/wwwoffled.c.orig Sun Jun 23 06:02:35 2002 ++++ src/wwwoffled.c +@@ -279,8 +279,7 @@ + if(uid!=-1 || gid!=-1) + PrintMessage(Inform,"Running with uid=%d, gid=%d.",geteuid(),getegid()); + +- +- /* Bind the HTTP proxy sockets. */ ++ /* Bind the HTTP proxy socket(s). */ #if USE_IPV6 + if(ConfigString(Bind_IPv6)) +@@ -291,40 +290,33 @@ + } + #endif + +-#if USE_IPV6 - if(http_fd[1]!=-1 && ConfigString(Bind_IPv4) && ConfigString(Bind_IPv6) && - !strcmp(ConfigString(Bind_IPv6),"0:0:0:0:0:0:0:0") && !strcmp(ConfigString(Bind_IPv4),"0.0.0.0")) - PrintMessage(Inform,"Not creating HTTP IPv4 server socket on all addresses since IPv6 one is bound to all addresses."); - else ++ if(ConfigString(Bind_IPv4)) { +-#endif +- if(ConfigString(Bind_IPv4)) ++ http_fd[0]=OpenServerSocket(ConfigString(Bind_IPv4),ConfigInteger(HTTP_Port)); ++ if(http_fd[0]==-1) + { +- http_fd[0]=OpenServerSocket(ConfigString(Bind_IPv4),ConfigInteger(HTTP_Port)); +- if(http_fd[0]==-1) +- { + #if USE_IPV6 ++ if(http_fd[1]!=-1 && ConfigString(Bind_IPv4) && !strcmp(ConfigString(Bind_IPv4),"0.0.0.0") && ++ ConfigString(Bind_IPv6) && !strcmp(ConfigString(Bind_IPv6),"0:0:0:0:0:0:0:0")) ++ PrintMessage(Warning,"Cannot create HTTP IPv4 server socket (but the IPv6 one might accept IPv4 connections)."); ++ else + PrintMessage(Fatal,"Cannot create HTTP IPv4 server socket."); + #else +- PrintMessage(Fatal,"Cannot create HTTP server socket."); ++ PrintMessage(Fatal,"Cannot create HTTP server socket."); #endif - if(ConfigString(Bind_IPv4)) -@@ -336,10 +332,6 @@ +- } + } +-#if USE_IPV6 + } +-#endif + + if(http_fd[0]==-1 && http_fd[1]==-1) + { + #if USE_IPV6 +- PrintMessage(Fatal,"Neither IPv4 or IPv6 HTTP socket could be bound."); ++ PrintMessage(Fatal,"The IPv4 and IPv6 HTTP sockets were not bound; are they disabled in the config file?"); + #else +- PrintMessage(Fatal,"The HTTP socket could not be bound."); ++ PrintMessage(Fatal,"The HTTP socket was not bound; are they disabled in the config file?"); #endif + } + +- +- /* Bind the WWWOFFLE control sockets. */ ++ /* Bind the WWWOFFLE control socket(s). */ #if USE_IPV6 + if(ConfigString(Bind_IPv6)) +@@ -335,35 +327,29 @@ + } + #endif + +-#if USE_IPV6 - if(wwwoffle_fd[1]!=-1 && ConfigString(Bind_IPv4) && ConfigString(Bind_IPv6) && - !strcmp(ConfigString(Bind_IPv6),"0:0:0:0:0:0:0:0") && !strcmp(ConfigString(Bind_IPv4),"0.0.0.0")) - PrintMessage(Inform,"Not creating WWWOFFLE IPv4 server socket on all addresses since IPv6 one is bound to all addresses."); - else ++ if(ConfigString(Bind_IPv4)) + { +-#endif +- if(ConfigString(Bind_IPv4)) ++ wwwoffle_fd[0]=OpenServerSocket(ConfigString(Bind_IPv4),ConfigInteger(WWWOFFLE_Port)); ++ if(wwwoffle_fd[0]==-1) + { +- wwwoffle_fd[0]=OpenServerSocket(ConfigString(Bind_IPv4),ConfigInteger(WWWOFFLE_Port)); +- if(wwwoffle_fd[0]==-1) +- { + #if USE_IPV6 ++ if(wwwoffle_fd[1]!=-1 && ConfigString(Bind_IPv4) && !strcmp(ConfigString(Bind_IPv4),"0.0.0.0") && ++ ConfigString(Bind_IPv6) && !strcmp(ConfigString(Bind_IPv6),"0:0:0:0:0:0:0:0")) ++ PrintMessage(Warning,"Cannot create WWWOFFLE IPv4 server socket (but the IPv6 one might accept IPv4 connections)."); ++ else + PrintMessage(Fatal,"Cannot create WWWOFFLE IPv4 server socket."); + #else +- PrintMessage(Fatal,"Cannot create WWWOFFLE server socket."); ++ PrintMessage(Fatal,"Cannot create WWWOFFLE server socket."); + #endif +- } + } +-#if USE_IPV6 + } +-#endif + + if(wwwoffle_fd[0]==-1 && wwwoffle_fd[1]==-1) { + #if USE_IPV6 +- PrintMessage(Fatal,"Neither IPv4 or IPv6 WWWOFFLE socket could be bound."); ++ PrintMessage(Fatal,"The IPv4 and IPv6 WWWOFFLE sockets were not bound; are they disabled in the config file?"); + #else +- PrintMessage(Fatal,"The WWWOFFLE socket could not be bound."); ++ PrintMessage(Fatal,"The WWWOFFLE socket was not bound; are they disabled in the config file?"); #endif - if(ConfigString(Bind_IPv4)) + } + |