calamaris: Bug fix for proxy reports staying empty after Core 136 upgrade

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 <matthias.fischer@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Matthias Fischer
2019-11-14 19:03:46 +01:00
committed by Arne Fitzenreiter
parent e557cecbdd
commit ee506d5027
2 changed files with 16 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
# Copyright (C) 2007-2019 IPFire Team <info@ipfire.org> #
# #
# 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}

View File

@@ -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' );