------------------------------------------------------------ revno: 13889 revision-id: squid3@treenet.co.nz-20150820134855-qgiv1ero3u4go1da parent: squid3@treenet.co.nz-20150820134737-ykphoqnnlmr5izr8 fixes bug: http://bugs.squid-cache.org/show_bug.cgi?id=4302 author: Amos Jeffries , Patrick Welche committer: Amos Jeffries branch nick: 3.5 timestamp: Thu 2015-08-20 06:48:55 -0700 message: Bug 4302: IPFilter v5 transparent interception ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20150820134855-qgiv1ero3u4go1da # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # testament_sha1: 4103f92fb5bd2090803d7b821450918dd3572101 # timestamp: 2015-08-20 13:51:06 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # base_revision_id: squid3@treenet.co.nz-20150820134737-\ # ykphoqnnlmr5izr8 # # Begin patch === modified file 'src/ip/Intercept.cc' --- src/ip/Intercept.cc 2015-01-13 09:13:49 +0000 +++ src/ip/Intercept.cc 2015-08-20 13:48:55 +0000 @@ -200,6 +200,19 @@ // all fields must be set to 0 memset(&natLookup, 0, sizeof(natLookup)); // for NAT lookup set local and remote IP:port's + if (newConn->remote.isIPv6()) { +#if IPFILTER_VERSION < 5000003 + // warn once every 10 at critical level, then push down a level each repeated event + static int warningLevel = DBG_CRITICAL; + debugs(89, warningLevel, "IPF (IPFilter v4) NAT does not support IPv6. Please upgrade to IPFilter v5.1"); + warningLevel = ++warningLevel % 10; + return false; +#else + natLookup.nl_v = 6; + } else { + natLookup.nl_v = 4; +#endif + } natLookup.nl_inport = htons(newConn->local.port()); newConn->local.getInAddr(natLookup.nl_inip); natLookup.nl_outport = htons(newConn->remote.port());