From owner-freebsd-ports-bugs@freebsd.org Mon Sep 7 16:17:17 2015 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 435279CC3C9 for ; Mon, 7 Sep 2015 16:17:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F239159A for ; Mon, 7 Sep 2015 16:17:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t87GHHUJ051144 for ; Mon, 7 Sep 2015 16:17:17 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 202950] [patch] www/squid: TP_IPF build fails on FreeBSD <10 Date: Mon, 07 Sep 2015 16:17:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: beastie@tardisi.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter cc flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2015 16:17:17 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202950 Bug ID: 202950 Summary: [patch] www/squid: TP_IPF build fails on FreeBSD <10 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: beastie@tardisi.com CC: timp87@gmail.com Flags: maintainer-feedback?(timp87@gmail.com) CC: timp87@gmail.com Keywords: patch Created attachment 160803 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=160803&action=edit proposed patch I'm assuming the problem only affects less than FreeBSD 10, since I believe ipf was upgraded to v5.1.2 in 10. While on my FreeBSD 9.3 it is v4.1.28. The compile fails here: libtool: compile: c++ -DHAVE_CONFIG_H -I../.. -I../../include -I../../lib -I../../src -I../../include -I../../libltdl -I/usr/include -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Werror -pipe -D_REENTRANT -O2 -pipe -march=nocona -I/usr/include -fstack-protector -I/usr/local/include -MT tools.lo -MD -MP -MF .deps/tools.Tpo -c tools.cc -o tools.o >/dev/null 2>&1 cc1plus: warnings being treated as errors Intercept.cc: In member function 'bool Ip::Intercept::IpfInterception(const Comm::ConnectionPointer&, int)': Intercept.cc:208: warning: operation on 'warningLevel' may be undefined *** [Intercept.lo] Error code 1 After some investigation, I found that the offending upstream code was add in the recent update: diff -u -r -N squid-3.5.7/src/ip/Intercept.cc squid-3.5.8/src/ip/Intercept.cc --- squid-3.5.7/src/ip/Intercept.cc 2015-07-31 23:08:17.000000000 -0700 +++ squid-3.5.8/src/ip/Intercept.cc 2015-09-01 12:52:00.000000000 -0700 @@ -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()); My proposed patch is to just comment out the defective nag to upgrade OS. -- You are receiving this mail because: You are the assignee for the bug.