]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Merge from trunk
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 8 Aug 2010 12:43:00 +0000 (00:43 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 8 Aug 2010 12:43:00 +0000 (00:43 +1200)
24 files changed:
1  2 
doc/release-notes/release-3.2.sgml
src/Makefile.am
src/Server.cc
src/Server.h
src/adaptation/icap/ModXact.cc
src/cache_cf.cc
src/cf.data.pre
src/client_side.cc
src/client_side.h
src/comm.cc
src/comm/ListenStateData.cc
src/dns_internal.cc
src/forward.cc
src/ftp.cc
src/gopher.cc
src/http.h
src/icp_v2.cc
src/ipcache.cc
src/log/ModTcp.cc
src/log/ModUdp.cc
src/main.cc
src/protos.h
src/snmp_core.cc
src/structs.h

Simple merge
diff --cc src/Makefile.am
Simple merge
diff --cc src/Server.cc
Simple merge
diff --cc src/Server.h
Simple merge
Simple merge
diff --cc src/cache_cf.cc
Simple merge
diff --cc src/cf.data.pre
Simple merge
Simple merge
Simple merge
diff --cc src/comm.cc
Simple merge
index 1cd7b36fd3572cf353af93e21fdbd105e136d3f8,8c03c5616153c82a896b7f9d6649d45f10d1e531..10980d8d9f8fbde6acb1919bfd849802486fc863
@@@ -299,17 -264,12 +299,13 @@@ Comm::ListenStateData::oldAccept(Comm::
      fdd_table[sock].close_line = 0;
  
      fde *F = &fd_table[sock];
 -    details.peer.NtoA(F->ipaddr,MAX_IPSTRLEN);
 -    F->remote_port = details.peer.GetPort();
 -    F->local_addr.SetPort(details.me.GetPort());
 -    F->sock_family = details.me.IsIPv6()?AF_INET6:AF_INET;
 -    details.me.FreeAddrInfo(gai);
 +    details.remote.NtoA(F->ipaddr,MAX_IPSTRLEN);
 +    F->remote_port = details.remote.GetPort();
 +    F->local_addr = details.local;
- #if USE_IPV6
-     F->sock_family = AF_INET;
- #else
-     F->sock_family = details.local.IsIPv4()?AF_INET:AF_INET6;
- #endif
++    F->sock_family = details.local.IsIPv6()?AF_INET6:AF_INET;
  
 +    // set socket flags
 +    commSetCloseOnExec(sock);
      commSetNonBlocking(sock);
  
      /* IFF the socket is (tproxy) transparent, pass the flag down to allow spoofing */
index f20d643d856c8b4996c16d09316f053b604f7fa6,c709ddbc3f3b6ee25e9401eb26a3242d09bdb636..661f3bcb377b4edcf2ff7d5d19d4e520f2e1bc89
   *
   */
  
 -#include "config.h"
  #include "squid.h"
 -#include "event.h"
  #include "CacheManager.h"
 -#include "SquidTime.h"
 -#include "Store.h"
 +#include "comm/Connection.h"
 +#include "comm/ConnOpener.h"
  #include "comm.h"
 +#include "event.h"
  #include "fde.h"
+ #include "ip/tools.h"
  #include "MemBuf.h"
 -
 +#include "SquidTime.h"
 +#include "Store.h"
  #include "wordlist.h"
  
  #if HAVE_ARPA_NAMESER_H
diff --cc src/forward.cc
index 9b9ed85b2e26eb71f7e14e4d014902719d253ff3,41461410caea3f87a0c6ca6fc0b5af3f6397d917..2c577acbdad54099b197b81b6fe6f5ae96e71ef2
  #include "Store.h"
  #include "icmp/net_db.h"
  #include "ip/Intercept.h"
+ #include "ip/tools.h"
  
 -static PSC fwdStartCompleteWrapper;
 +
 +static PSC fwdPeerSelectionCompleteWrapper;
  static PF fwdServerClosedWrapper;
  #if USE_SSL
  static PF fwdNegotiateSSLWrapper;
diff --cc src/ftp.cc
index 50a2ed20243483e3382cd13e2a5f739b1f63fbc0,33a8cb8791d54192658ee2689764b631a8b94681..ef997408b554d3eb1ff347e11c3dbe341d52dca0
@@@ -2351,23 -2343,22 +2353,22 @@@ ftpReadEPSV(FtpStateData* ftpState
              ftpState->state = SENT_EPSV_2; /* simulate having sent and failed EPSV 2 */
              ftpSendPassive(ftpState);
          } else if (strcmp(buf, "(2)") == 0) {
- #if USE_IPV6
-             /* If server only supports EPSV 2 and we have already tried that. Go straight to EPRT */
-             if (ftpState->state == SENT_EPSV_2) {
-                 ftpSendEPRT(ftpState);
+             if (Ip::EnableIpv6) {
+                 /* If server only supports EPSV 2 and we have already tried that. Go straight to EPRT */
+                 if (ftpState->state == SENT_EPSV_2) {
+                     ftpSendEPRT(ftpState);
+                 } else {
+                     /* or try the next Passive mode down the chain. */
+                     ftpSendPassive(ftpState);
+                 }
              } else {
-                 /* or try the next Passive mode down the chain. */
+                 /* Server only accept EPSV in IPv6 traffic. */
+                 ftpState->state = SENT_EPSV_1; /* simulate having sent and failed EPSV 1 */
                  ftpSendPassive(ftpState);
              }
- #else
-             /* We do not support IPv6. Remote server requires it.
-                So we must simulate having failed all EPSV methods. */
-             ftpState->state = SENT_EPSV_1;
-             ftpSendPassive(ftpState);
- #endif
          } else {
              /* handle broken server (RFC 2428 says MUST specify supported protocols in 522) */
 -            debugs(9, DBG_IMPORTANT, "WARNING: Server at " << fd_table[ftpState->ctrl.fd].ipaddr << " sent unknown protocol negotiation hint: " << buf);
 +            debugs(9, DBG_IMPORTANT, "WARNING: Server at " << ftpState->ctrl.conn->remote << " sent unknown protocol negotiation hint: " << buf);
              ftpSendPassive(ftpState);
          }
          return;
@@@ -2531,16 -2528,14 +2532,14 @@@ ftpSendPassive(FtpStateData * ftpState
              /* block other non-EPSV connections being attempted */
              ftpState->flags.epsv_all_sent = true;
          } else {
- #if USE_IPV6
 -            if (addr.IsIPv6()) {
 -                debugs(9, 5, HERE << "FTP Channel (" << addr << "). Sending default EPSV 2");
 -                snprintf(cbuf, 1024, "EPSV 2\r\n");
 +            if (ftpState->ctrl.conn->local.IsIPv6()) {
 +                debugs(9, 5, HERE << "FTP Channel (" << ftpState->ctrl.conn->remote << "). Sending default EPSV 2");
 +                snprintf(cbuf, CTRL_BUFLEN, "EPSV 2\r\n");
                  ftpState->state = SENT_EPSV_2;
              }
- #endif
 -            if (addr.IsIPv4()) {
 -                debugs(9, 5, HERE << "Channel (" << addr <<"). Sending default EPSV 1");
 -                snprintf(cbuf, 1024, "EPSV 1\r\n");
 +            if (ftpState->ctrl.conn->local.IsIPv4()) {
 +                debugs(9, 5, HERE << "Channel (" << ftpState->ctrl.conn->remote <<"). Sending default EPSV 1");
 +                snprintf(cbuf, CTRL_BUFLEN, "EPSV 1\r\n");
                  ftpState->state = SENT_EPSV_1;
              }
          }
diff --cc src/gopher.cc
Simple merge
diff --cc src/http.h
Simple merge
diff --cc src/icp_v2.cc
index b321bc409a171a1b3a66c3ec7b8189a63c814bf4,284e3abe3b91d45916a5f799355385b9feaac503..5bbc5bd5d4836f647a1c51062e50eb0080ef81f8
   */
  
  #include "squid.h"
 -#include "Store.h"
 -#include "comm.h"
 -#include "ICP.h"
 -#include "HttpRequest.h"
 -#include "acl/FilledChecklist.h"
 -#include "acl/Acl.h"
  #include "AccessLogEntry.h"
 -#include "wordlist.h"
 -#include "SquidTime.h"
 -#include "SwapDir.h"
 +#include "acl/Acl.h"
 +#include "acl/FilledChecklist.h"
 +#include "comm/Connection.h"
 +#include "HttpRequest.h"
  #include "icmp/net_db.h"
 +#include "ICP.h"
  #include "ip/Address.h"
+ #include "ip/tools.h"
  #include "ipc/StartListening.h"
  #include "rfc1738.h"
 +#include "Store.h"
 +#include "SquidTime.h"
 +#include "SwapDir.h"
 +#include "wordlist.h"
  
  /// dials icpIncomingConnectionOpened call
  class IcpListeningStartedDialer: public CallDialer,
diff --cc src/ipcache.cc
index 2f14c6dc21844e2ba4a03b7861b5269bdd92aa6a,3210065853f493761704828da626c25346f9171f..746d2651222b64d7a0e6b5953f1f8074008b2784
   */
  
  #include "squid.h"
+ #include "CacheManager.h"
  #include "cbdata.h"
 +#include "CacheManager.h"
 +#include "DnsLookupDetails.h"
  #include "event.h"
  #include "ip/Address.h"
+ #include "ip/tools.h"
  #include "SquidTime.h"
  #include "Store.h"
  #include "wordlist.h"
Simple merge
Simple merge
diff --cc src/main.cc
Simple merge
diff --cc src/protos.h
Simple merge
index 1781eedb07787be7cd3350308fb87a29edda33f0,25d4d80a1cf1671e4755fba17319c57939c2c1c4..390c7b6168146ccdfb3d506e81c6b93f8a0f3c05
  #include "acl/FilledChecklist.h"
  #include "cache_snmp.h"
  #include "comm.h"
 +#include "comm/Connection.h"
  #include "ipc/StartListening.h"
- #include "compat/strsep.h"
  #include "ip/Address.h"
+ #include "ip/tools.h"
  
  #define SNMP_REQUEST_SIZE 4096
  #define MAX_PROTOSTAT 5
diff --cc src/structs.h
Simple merge