Diff for /loncom/configuration/Firewall.pm between versions 1.20 and 1.22

version 1.20, 2020/01/11 22:07:54 version 1.22, 2021/01/04 18:24:51
Line 119  sub firewall_open_port { Line 119  sub firewall_open_port {
                 @lond_port_curropen);                  @lond_port_curropen);
             if (ref($iphost) eq 'HASH') {              if (ref($iphost) eq 'HASH') {
                 if (keys(%{$iphost}) > 0) {                  if (keys(%{$iphost}) > 0) {
                       my $count = scalar(keys(%{$iphost}));
                       if ($count > 1) {
                           print "Please be patient. Checking $count IPs.\n";
                       }
                     my %curropen;                      my %curropen;
                     if ($firewalld) {                      if ($firewalld) {
                         &firewall_close_anywhere($iptables,$zone,$port,$firewalld);                          &firewall_close_anywhere($iptables,$zone,$port,$firewalld);
Line 132  sub firewall_open_port { Line 136  sub firewall_open_port {
                                                                  $lond_port,$iphost,\%curropen);                                                                   $lond_port,$iphost,\%curropen);
                         }                          }
                     }                      }
                       my $countok = 0;
                     foreach my $key (keys(%{$iphost})) {                      foreach my $key (keys(%{$iphost})) {
                         my $ip = '';                          my $ip = '';
                         if ($key =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/) {                          if ($key =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/) {
Line 179  sub firewall_open_port { Line 184  sub firewall_open_port {
                                 }                                  }
                             }                              }
                         }                          }
                           if ($count > 1) {
                               $countok ++;
                               print '.';
                               if ($countok%40 == 0) {
                                   print "\n";
                               }
                           }
                       }
                       if ($count > 1) {
                           if ($countok%40) { 
                               print "\n"; 
                           }
                     }                      }
                 } else {                  } else {
                     print "no key found in $iphost hash ref\n";                      print "no key found in \$iphost hash ref.\n".
                             "Domain Name Service (DNS) may not be available.\n".
                             "If this LON-CAPA node is standalone, then you can fix this issue by modifying /etc/hosts.\n".
                             "Use a text editor to add: IPaddress Hostname\n";
                 }                  }
             } else {              } else {
                 print "$iphost is not a reference to a hash\n";                  print "\$iphost is not a reference to a hash\n";
             }              }
             if (@lond_port_curropen) {              if (@lond_port_curropen) {
                 unless (grep(/^\Q$port\E$/,@opened)) {                  unless (grep(/^\Q$port\E$/,@opened)) {

Removed from v.1.20  
changed lines
  Added in v.1.22


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>