[LON-CAPA-cvs] cvs: loncom /configuration Firewall.pm

raeburn raeburn at source.lon-capa.org
Mon Jan 4 13:24:51 EST 2021


raeburn		Mon Jan  4 18:24:51 2021 EDT

  Modified files:              
    /loncom/configuration	Firewall.pm 
  Log:
  - Show activity while firewall rules are checked for lond port unless this is
    a standalone server.
  
  
Index: loncom/configuration/Firewall.pm
diff -u loncom/configuration/Firewall.pm:1.21 loncom/configuration/Firewall.pm:1.22
--- loncom/configuration/Firewall.pm:1.21	Thu Jul  9 13:42:37 2020
+++ loncom/configuration/Firewall.pm	Mon Jan  4 18:24:51 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Firewall configuration to allow internal LON-CAPA communication between servers   
 #
-# $Id: Firewall.pm,v 1.21 2020/07/09 13:42:37 raeburn Exp $
+# $Id: Firewall.pm,v 1.22 2021/01/04 18:24:51 raeburn Exp $
 #
 # The LearningOnline Network with CAPA
 #
@@ -119,6 +119,10 @@
                 @lond_port_curropen);
             if (ref($iphost) eq 'HASH') {
                 if (keys(%{$iphost}) > 0) {
+                    my $count = scalar(keys(%{$iphost}));
+                    if ($count > 1) {
+                        print "Please be patient. Checking $count IPs.\n";
+                    }
                     my %curropen;
                     if ($firewalld) {
                         &firewall_close_anywhere($iptables,$zone,$port,$firewalld);
@@ -132,6 +136,7 @@
                                                                  $lond_port,$iphost,\%curropen);
                         }
                     }
+                    my $countok = 0;
                     foreach my $key (keys(%{$iphost})) {
                         my $ip = '';
                         if ($key =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/) {
@@ -179,6 +184,18 @@
                                 }
                             }
                         }
+                        if ($count > 1) {
+                            $countok ++;
+                            print '.';
+                            if ($countok%40 == 0) {
+                                print "\n";
+                            }
+                        }
+                    }
+                    if ($count > 1) {
+                        if ($countok%40) { 
+                            print "\n"; 
+                        }
                     }
                 } else {
                     print "no key found in \$iphost hash ref.\n".




More information about the LON-CAPA-cvs mailing list