]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Forward Firewall: when a service is used in a servicegroup, it was not updated when...
authorAlexander Marx <amarx@ipfire.org>
Fri, 8 Feb 2013 05:00:41 +0000 (06:00 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Aug 2013 12:08:18 +0000 (14:08 +0200)
html/cgi-bin/fwhosts.cgi

index c23c9093759b135eea9d53098266d3b07f4a5102..6ce7ac8df2e635e4e60cdfa6212c18b1b94ae8ba 100755 (executable)
@@ -151,7 +151,6 @@ if ($fwhostsettings{'ACTION'} eq 'updateservice')
                $customservice{$key1}[3] = $fwhostsettings{'ICMP_TYPES'};
                $customservice{$key1}[4] = $count;
                &General::writehasharray("$configsrv", \%customservice);
-               
                #check if we need to update firewallrules
                if ($fwhostsettings{'SRV_NAME'} ne $fwhostsettings{'oldsrvname'}){
                        if ( ! -z $fwconfigfwd ){
@@ -172,9 +171,19 @@ if ($fwhostsettings{'ACTION'} eq 'updateservice')
                                }
                                &General::writehasharray("$fwconfiginp", \%fwinp);
                        }
+                       #check if we need to update groups
+                       &General::readhasharray("$configsrvgrp", \%customservicegrp);
+                       foreach my $key (sort keys %customservicegrp){
+                               if($customservicegrp{$key}[2] eq $fwhostsettings{'oldsrvname'}){
+                                       $customservicegrp{$key}[2] = $fwhostsettings{'SRV_NAME'};
+                               }
+                       }
+                       &General::writehasharray("$configsrvgrp", \%customservicegrp);
+                       
                        $needrules='on';
                }
                
+               
                if($count gt 0 && $fwhostsettings{'oldsrvport'} ne $fwhostsettings{'SRV_PORT'} ){
                        $needrules='on';
                }