From patchwork Thu Nov 14 18:03:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Fischer X-Patchwork-Id: 2597 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 47DTrR2SL2z43Td for ; Thu, 14 Nov 2019 18:04:07 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 47DTrP1pJ2z1qf; Thu, 14 Nov 2019 18:04:05 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 47DTrP0GT2z2xxQ; Thu, 14 Nov 2019 18:04:05 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 47DTrM36tTz2xxQ for ; Thu, 14 Nov 2019 18:03:53 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 47DTr90KFrz1qf for ; Thu, 14 Nov 2019 18:03:52 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1573754633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=wsjW86w2/Mmn8oLTJOZoKmTSMT0MQ0HLjt3Sc3Q8r88=; b=xVU3j3VMSWOQKo+9MBZo4sal7kd4Hpljh6YSVyNqWi47R6nu6hkXemjTTDzU82iBiodc2k 8X8pJOJwz3sOlAAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1573754633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=wsjW86w2/Mmn8oLTJOZoKmTSMT0MQ0HLjt3Sc3Q8r88=; b=ciGv2qYrK8jfjHc96Qe1nU0o2AzOciJ6yEiqDKlnN4sbRpwv/H30wDCGcsibKway2Mm8ng 8dsx28DFidqMv1VDGD2PhGT9xXWwbInpl4WU2xL3AzWndiVd0ccxBj6l9l/opzY2jWZcOu 2Gel0FYUj860U7PF8jL1aayjTShI7L11ZwK7IE5aG4WxqYvibl4G6PEZuMSMZg48IqDVgp Bl/3srb6Xmb89vazV+GIk7OpFpVdh1gzS4KsYrg3iqXOVzusMv1A0mbZfdqMQbuafkJ2ah HPzhY/mi63v0BVIjdsRmOcRHmWsggscT80axWqAVzpZaOSG2gL8XPXD5XdvsGw== From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH] calamaris: Bug fix for proxy reports staying empty after Core 136 upgrade Date: Thu, 14 Nov 2019 19:03:46 +0100 Message-Id: <20191114180346.2010-1-matthias.fischer@ipfire.org> Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=mfischer smtp.mailfrom=matthias.fischer@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" After upgrading to Core 136, 'calamaris' "Proxy reports" stayed empty. GUI always show "No reports available". Tested manually on console stops and throws an error: ... root@ipfire: ~ # /usr/bin/perl /var/ipfire/proxy/calamaris/bin/mkreport 1 0 2019 8 10 2019 -d 10 -P 30 -t 10 -D 2 -u -r -1 -R 100 -s Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at /var/ipfire/proxy/calamaris/bin/calamaris line 2609. ... Line 2609 was changed and reports are built again. Signed-off-by: Matthias Fischer Reviewed-by: Michael Tremer --- lfs/calamaris | 5 ++++- .../01_calamaris_cant_use_defined_hash.patch | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 src/patches/calamaris/01_calamaris_cant_use_defined_hash.patch diff --git a/lfs/calamaris b/lfs/calamaris index 2022f84f8..32858526a 100644 --- a/lfs/calamaris +++ b/lfs/calamaris @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2018 IPFire Team # +# Copyright (C) 2007-2019 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -70,6 +70,9 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/calamaris/01_calamaris_cant_use_defined_hash.patch + cd $(DIR_APP) && cp -f calamaris $(DIR_SRC)/config/calamaris/mkreport \ /var/ipfire/proxy/calamaris/bin/ chmod 755 /var/ipfire/proxy/calamaris/bin/{calamaris,mkreport} diff --git a/src/patches/calamaris/01_calamaris_cant_use_defined_hash.patch b/src/patches/calamaris/01_calamaris_cant_use_defined_hash.patch new file mode 100644 index 000000000..64d66276c --- /dev/null +++ b/src/patches/calamaris/01_calamaris_cant_use_defined_hash.patch @@ -0,0 +1,12 @@ +diff U3 a/calamaris b/calamaris +--- a/calamaris Sun Jun 6 18:26:14 2004 ++++ b/calamaris Wed Nov 13 19:59:15 2019 +@@ -2606,7 +2606,7 @@ + 100, 100 * $tcp_hit / $tcp ); + } + outstop(10); +- if ( defined(%tcp_content) ) { ++ if (%tcp_content) { + outstart(11); + if ( $tcp == 0 ) { + outline( 11, 'no matching requests' );