]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Merge branch 'next'
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 4 Oct 2014 11:53:49 +0000 (13:53 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 4 Oct 2014 11:53:49 +0000 (13:53 +0200)
config/firewall/rules.pl
config/rootfiles/core/84/filelists/squid [new symlink]
config/rootfiles/core/84/update.sh
lfs/squid

index 40fb8dd2ac821f360b3f77c57624e09ce2893773..4d703825d170b588fecb61043e424d57904de2ce 100755 (executable)
@@ -131,6 +131,12 @@ sub print_rule {
        print "\n";
 }
 
+sub count_elements {
+       my $hash = shift;
+
+       return scalar @$hash;
+}
+
 sub flush {
        run("$IPTABLES -F $CHAIN_INPUT");
        run("$IPTABLES -F $CHAIN_FORWARD");
@@ -186,6 +192,9 @@ sub buildrules {
                # Skip disabled rules.
                next unless ($$hash{$key}[2] eq 'ON');
 
+               # Count number of elements in this line
+               my $elements = &count_elements($$hash{$key});
+
                if ($DEBUG) {
                        print_rule($$hash{$key});
                }
@@ -270,7 +279,8 @@ sub buildrules {
 
                # Concurrent connection limit
                my @ratelimit_options = ();
-               if ($$hash{$key}[32] eq 'ON') {
+
+               if (($elements gt 34) && ($$hash{$key}[32] eq 'ON')) {
                        my $conn_limit = $$hash{$key}[33];
 
                        if ($conn_limit ge 1) {
@@ -286,7 +296,7 @@ sub buildrules {
                }
 
                # Ratelimit
-               if ($$hash{$key}[34] eq 'ON') {
+               if (($elements gt 37) && ($$hash{$key}[34] eq 'ON')) {
                        my $rate_limit = "$$hash{$key}[35]/$$hash{$key}[36]";
 
                                if ($rate_limit) {
diff --git a/config/rootfiles/core/84/filelists/squid b/config/rootfiles/core/84/filelists/squid
new file mode 120000 (symlink)
index 0000000..2dc8372
--- /dev/null
@@ -0,0 +1 @@
+../../../common/squid
\ No newline at end of file
index 1b8332664b1ee4a1e35bfb7e09ab7c6df9fc7ad3..93a9e2016b883a6eec51e39d058081ccf53b0bc8 100644 (file)
@@ -32,6 +32,7 @@ do
 done
 
 # Stop services
+/etc/init.d/squid stop
 /etc/init.d/dnsmasq stop
 
 # Remove old files
@@ -41,6 +42,7 @@ extract_files
 
 # Start services
 /etc/init.d/dnsmasq start
+/etc/init.d/squid start
 
 # Update Language cache
 perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
index 921feebf2e304094c42c089467ace5e015c0ee34..548abd937a2373d3dafd41abd92beb205949a550 100644 (file)
--- a/lfs/squid
+++ b/lfs/squid
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 3.4.7
+VER        = 3.4.8
 
 THISAPP    = squid-$(VER)
 DL_FILE    = $(THISAPP).tar.xz
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 74677634121649ccb87a5655fcd4298d
+$(DL_FILE)_MD5 = b0c4335447248810169f58ea4d8b204a
 
 install : $(TARGET)