From: Amos Jeffries Date: Sat, 13 Sep 2008 01:15:56 +0000 (+1200) Subject: Debug display alterations X-Git-Tag: SQUID_3_1_0_1~49^2~18^2~11 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=ba8d006b8664fc389ee9df1575cdfbfafc343a74;p=thirdparty%2Fsquid.git Debug display alterations Enable on/off for all interception errors. Turn on. Option to silence all NAT if TPROXY in use re-order code for sightly faster performance on lookups. --- diff --git a/src/IPInterception.cc b/src/IPInterception.cc index b064d8eaa3..4787e05bd3 100644 --- a/src/IPInterception.cc +++ b/src/IPInterception.cc @@ -340,14 +340,26 @@ IPIntercept::NatLookup(int fd, const IPAddress &me, const IPAddress &peer, IPAdd /* Netfilter and IPFW share almost identical lookup methods for their NAT tables. * This allows us to perform a nice clean failover sequence for them. */ - int silent = (squid_curtime - last_reported > 60 ? 0 : 1); dst = me; if( !me.IsIPv4() ) return -1; if( !peer.IsIPv4() ) return -1; +#if 0 + // Crop interception errors down to one per minute. + int silent = (squid_curtime - last_reported > 60 ? 0 : 1); +#else + // Show all interception errors. + int silent = 0; +#endif + if(intercept_active) { + +#if TO_SILENCE_ALL_NAT_IF_TPROXY_IS_RUNNING + silent |= fd_table[fd].flags.transparent; +#endif + if( NetfilterInterception(fd, me, dst, silent) == 0) return 0; if( IPFWInterception(fd, me, dst, silent) == 0) return 0; }