Merge remote-tracking branch 'stevee/imx6q-wandboard-rbased' into fifteen
authorArne Fitzenreiter <arne_f@ipfire.org>
Mon, 23 Dec 2013 21:24:23 +0000 (22:24 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 23 Dec 2013 21:24:23 +0000 (22:24 +0100)
16 files changed:
config/rootfiles/common/armv5tel/lm_sensors
config/rootfiles/common/i586/lm_sensors
doc/language_issues.es
doc/language_issues.fr
doc/language_issues.nl
doc/language_issues.pl
doc/language_issues.ru
doc/language_issues.tr
doc/language_missings
html/cgi-bin/firewall.cgi
html/cgi-bin/fwhosts.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl
lfs/linux
lfs/lm_sensors
src/initscripts/init.d/collectd

index 774e47d..4d17590 100644 (file)
@@ -8,7 +8,7 @@ usr/bin/sensors-conf-convert
 #usr/lib/libsensors.a
 usr/lib/libsensors.so
 usr/lib/libsensors.so.4
-usr/lib/libsensors.so.4.3.1
+usr/lib/libsensors.so.4.3.2
 #usr/man/man1/sensors.1
 #usr/man/man3/libsensors.3
 #usr/man/man5/sensors.conf.5
index 217ac54..f23b97c 100644 (file)
@@ -8,7 +8,7 @@ usr/bin/sensors-conf-convert
 #usr/lib/libsensors.a
 usr/lib/libsensors.so
 usr/lib/libsensors.so.4
-usr/lib/libsensors.so.4.3.1
+usr/lib/libsensors.so.4.3.2
 #usr/man/man1/sensors.1
 #usr/man/man3/libsensors.3
 #usr/man/man5/sensors.conf.5
index f735730..356dc0e 100644 (file)
@@ -643,6 +643,7 @@ WARNING: untranslated string: fwdfw delete
 WARNING: untranslated string: fwdfw dnat
 WARNING: untranslated string: fwdfw dnat error
 WARNING: untranslated string: fwdfw dnat porterr
+WARNING: untranslated string: fwdfw dnat porterr2
 WARNING: untranslated string: fwdfw edit
 WARNING: untranslated string: fwdfw err nosrc
 WARNING: untranslated string: fwdfw err nosrcip
index e33e653..6e1c15b 100644 (file)
@@ -646,6 +646,7 @@ WARNING: untranslated string: fwdfw delete
 WARNING: untranslated string: fwdfw dnat
 WARNING: untranslated string: fwdfw dnat error
 WARNING: untranslated string: fwdfw dnat porterr
+WARNING: untranslated string: fwdfw dnat porterr2
 WARNING: untranslated string: fwdfw edit
 WARNING: untranslated string: fwdfw err nosrc
 WARNING: untranslated string: fwdfw err nosrcip
index 92ef57e..902b6e5 100644 (file)
@@ -592,6 +592,7 @@ WARNING: untranslated string: fwdfw delete
 WARNING: untranslated string: fwdfw dnat
 WARNING: untranslated string: fwdfw dnat error
 WARNING: untranslated string: fwdfw dnat porterr
+WARNING: untranslated string: fwdfw dnat porterr2
 WARNING: untranslated string: fwdfw edit
 WARNING: untranslated string: fwdfw err nosrc
 WARNING: untranslated string: fwdfw err nosrcip
index f735730..356dc0e 100644 (file)
@@ -643,6 +643,7 @@ WARNING: untranslated string: fwdfw delete
 WARNING: untranslated string: fwdfw dnat
 WARNING: untranslated string: fwdfw dnat error
 WARNING: untranslated string: fwdfw dnat porterr
+WARNING: untranslated string: fwdfw dnat porterr2
 WARNING: untranslated string: fwdfw edit
 WARNING: untranslated string: fwdfw err nosrc
 WARNING: untranslated string: fwdfw err nosrcip
index 7e1a86d..a5e6638 100644 (file)
@@ -629,6 +629,7 @@ WARNING: untranslated string: fwdfw delete
 WARNING: untranslated string: fwdfw dnat
 WARNING: untranslated string: fwdfw dnat error
 WARNING: untranslated string: fwdfw dnat porterr
+WARNING: untranslated string: fwdfw dnat porterr2
 WARNING: untranslated string: fwdfw edit
 WARNING: untranslated string: fwdfw err nosrc
 WARNING: untranslated string: fwdfw err nosrcip
index fe1aed6..810b3d6 100644 (file)
@@ -588,6 +588,7 @@ WARNING: untranslated string: fwdfw delete
 WARNING: untranslated string: fwdfw dnat
 WARNING: untranslated string: fwdfw dnat error
 WARNING: untranslated string: fwdfw dnat porterr
+WARNING: untranslated string: fwdfw dnat porterr2
 WARNING: untranslated string: fwdfw edit
 WARNING: untranslated string: fwdfw err nosrc
 WARNING: untranslated string: fwdfw err nosrcip
index 8a751f0..0b6e3f0 100644 (file)
 < fwdfw dnat
 < fwdfw dnat error
 < fwdfw dnat porterr
+< fwdfw dnat porterr2
 < fwdfw DROP
 < fwdfw edit
 < fwdfw err nosrc
 < fwdfw dnat
 < fwdfw dnat error
 < fwdfw dnat porterr
+< fwdfw dnat porterr2
 < fwdfw DROP
 < fwdfw edit
 < fwdfw err nosrc
 < fwdfw dnat
 < fwdfw dnat error
 < fwdfw dnat porterr
+< fwdfw dnat porterr2
 < fwdfw DROP
 < fwdfw edit
 < fwdfw err nosrc
 < fwdfw dnat
 < fwdfw dnat error
 < fwdfw dnat porterr
+< fwdfw dnat porterr2
 < fwdfw DROP
 < fwdfw edit
 < fwdfw err nosrc
index 28a7f0b..71ca752 100755 (executable)
@@ -729,8 +729,11 @@ sub checkrule
 {
        #check valid port for NAT
        if($fwdfwsettings{'USE_NAT'} eq 'ON'){
-               #if no port is given in nat area, take target host port
+               #if no dest port is given in nat area, take target host port
                if($fwdfwsettings{'nat'} eq 'dnat' && $fwdfwsettings{'grp3'} eq 'TGT_PORT' && $fwdfwsettings{'dnatport'} eq ''){$fwdfwsettings{'dnatport'}=$fwdfwsettings{'TGT_PORT'};}
+               if($fwdfwsettings{'TGT_PORT'} eq ''){
+                       $errormessage=$Lang::tr{'fwdfw dnat porterr2'};
+               }
                #check if port given in nat area is a single valid port or portrange
                if($fwdfwsettings{'nat'} eq 'dnat' && $fwdfwsettings{'TGT_PORT'} ne '' && !&check_natport($fwdfwsettings{'dnatport'})){
                        $errormessage=$Lang::tr{'fwdfw target'}.": ".$Lang::tr{'fwdfw dnat porterr'}."<br>";
@@ -783,6 +786,10 @@ sub checkrule
                                        }
                                        $fwdfwsettings{'dnatport'}=join("|",@values);
                }
+               #check if a rule with prot tcp or udp and ports is edited and now prot is "all", then delete all ports
+               if($fwdfwsettings{'PROT'} eq ''){
+                       $fwdfwsettings{'dnatport'}='';
+               }
        }
        #check valid remark
        if ($fwdfwsettings{'ruleremark'} ne '' && !&validremark($fwdfwsettings{'ruleremark'})){
index 7fb05de..3e59a9d 100755 (executable)
@@ -111,6 +111,12 @@ print<<END;
                var protocol = \$("#protocol").val();
                \$("#protocol").change(update_protocol);
                update_protocol();
+               // Automatically select radio buttons when corresponding
+               // dropdown menu changes.
+               \$("select").change(function() {
+                       var id = \$(this).attr("name");
+                       \$('#' + id).prop("checked", true);
+               });
        });
 </script>
 END
@@ -268,7 +274,6 @@ if ($fwhostsettings{'ACTION'} eq 'updateservice')
 # save
 if ($fwhostsettings{'ACTION'} eq 'savenet' )
 {
-       my $count=0;
        my $needrules=0;
        if ($fwhostsettings{'orgname'} eq ''){$fwhostsettings{'orgname'}=$fwhostsettings{'HOSTNAME'};}
        #check if all fields are set
@@ -342,7 +347,6 @@ if ($fwhostsettings{'ACTION'} eq 'savenet' )
                        $customnetwork{$key}[1] = $fwhostsettings{'orgip'} ;
                        $customnetwork{$key}[2] = $fwhostsettings{'orgsub'};
                        $customnetwork{$key}[3] = $fwhostsettings{'orgnetremark'};
-                       $customnetwork{$key}[4] = $fwhostsettings{'count'};
                        &General::writehasharray("$confignet", \%customnetwork);
                        undef %customnetwork;
                }                       
@@ -353,7 +357,6 @@ if ($fwhostsettings{'ACTION'} eq 'savenet' )
                                if ($fwhostsettings{'update'} == '0'){
                                        foreach my $key (keys %customnetwork) {
                                                if($customnetwork{$key}[0] eq $fwhostsettings{'orgname'}){
-                                                       $count=$customnetwork{$key}[4];
                                                        delete $customnetwork{$key};
                                                        last;
                                                }
@@ -363,9 +366,8 @@ if ($fwhostsettings{'ACTION'} eq 'savenet' )
                        #get count if actualize is 'on'
                        if($fwhostsettings{'actualize'} eq 'on'){
                                $fwhostsettings{'actualize'} = '';
-                               $count=$fwhostsettings{'count'};
                                #check if we need to reload rules
-                               if($fwhostsettings{'orgip'}  ne $fwhostsettings{'IP'}  && $count gt '0'){
+                               if($fwhostsettings{'orgip'}  ne $fwhostsettings{'IP'}){
                                        $needrules='on';
                                }
                                if ($fwhostsettings{'orgname'} ne $fwhostsettings{'HOSTNAME'}){
@@ -403,7 +405,7 @@ if ($fwhostsettings{'ACTION'} eq 'savenet' )
                                }
                        }                                       
                        my $key = &General::findhasharraykey (\%customnetwork);
-                       foreach my $i (0 .. 4) { $customnetwork{$key}[$i] = "";}
+                       foreach my $i (0 .. 3) { $customnetwork{$key}[$i] = "";}
                        $fwhostsettings{'SUBNET'}       = &General::iporsubtocidr($fwhostsettings{'SUBNET'});
                        $customnetwork{$key}[0]         = $fwhostsettings{'HOSTNAME'};
                        #convert ip when leading '0' in byte
@@ -411,9 +413,7 @@ if ($fwhostsettings{'ACTION'} eq 'savenet' )
                        $fwhostsettings{'IP'}           =&General::dec2ip($fwhostsettings{'IP'});
                        $customnetwork{$key}[1]         = &General::getnetworkip($fwhostsettings{'IP'},$fwhostsettings{'SUBNET'}) ;
                        $customnetwork{$key}[2]         = &General::iporsubtodec($fwhostsettings{'SUBNET'}) ;
-                       if($fwhostsettings{'newnet'} eq 'on'){$count=0;}
                        $customnetwork{$key}[3]         = $fwhostsettings{'NETREMARK'};
-                       $customnetwork{$key}[4]         = $count;
                        &General::writehasharray("$confignet", \%customnetwork);
                        $fwhostsettings{'IP'}=$fwhostsettings{'IP'}."/".&General::iporsubtodec($fwhostsettings{'SUBNET'});
                        undef %customnetwork;
@@ -435,7 +435,6 @@ if ($fwhostsettings{'ACTION'} eq 'savenet' )
 }
 if ($fwhostsettings{'ACTION'} eq 'savehost')
 {
-       my $count=0;
        my $needrules=0;
        if ($fwhostsettings{'orgname'} eq ''){$fwhostsettings{'orgname'}=$fwhostsettings{'HOSTNAME'};}
        $fwhostsettings{'SUBNET'}='32';
@@ -483,7 +482,7 @@ if ($fwhostsettings{'ACTION'} eq 'savehost')
                if($fwhostsettings{'actualize'} eq 'on' && $fwhostsettings{'newhost'} ne 'on' && $errormessage){
                        $fwhostsettings{'actualize'} = '';
                        my $key = &General::findhasharraykey (\%customhost);
-                       foreach my $i (0 .. 4) { $customhost{$key}[$i] = "";}
+                       foreach my $i (0 .. 3) { $customhost{$key}[$i] = "";}
                        $customhost{$key}[0] = $fwhostsettings{'orgname'} ;
                        $customhost{$key}[1] = $fwhostsettings{'type'} ;
                        if($customhost{$key}[1] eq 'ip'){
@@ -492,15 +491,13 @@ if ($fwhostsettings{'ACTION'} eq 'savehost')
                                $customhost{$key}[2] = $fwhostsettings{'orgip'};
                        }
                        $customhost{$key}[3] = $fwhostsettings{'orgremark'};
-                       $customhost{$key}[4] = $fwhostsettings{'count'};
                        &General::writehasharray("$confighost", \%customhost);
                        undef %customhost;
                } 
                if (!$errormessage){
                        #get count if host was edited
                        if($fwhostsettings{'actualize'} eq 'on'){
-                               $count=$fwhostsettings{'count'};
-                               if($fwhostsettings{'orgip'} ne $fwhostsettings{'IP'} && $count gt '0' ){
+                               if($fwhostsettings{'orgip'} ne $fwhostsettings{'IP'}){
                                        $needrules='on';
                                }
                                if($fwhostsettings{'orgname'} ne $fwhostsettings{'HOSTNAME'}){
@@ -537,7 +534,7 @@ if ($fwhostsettings{'ACTION'} eq 'savehost')
                                }
                        }
                        my $key = &General::findhasharraykey (\%customhost);
-                       foreach my $i (0 .. 4) { $customhost{$key}[$i] = "";}
+                       foreach my $i (0 .. 3) { $customhost{$key}[$i] = "";}
                        $customhost{$key}[0] = $fwhostsettings{'HOSTNAME'} ;
                        $customhost{$key}[1] = $fwhostsettings{'type'} ;
                        if ($fwhostsettings{'type'} eq 'ip'){
@@ -548,9 +545,7 @@ if ($fwhostsettings{'ACTION'} eq 'savehost')
                        }else{
                                $customhost{$key}[2] = $fwhostsettings{'IP'};
                        }
-                       if($fwhostsettings{'newhost'} eq 'on'){$count=0;}
                        $customhost{$key}[3] = $fwhostsettings{'HOSTREMARK'};
-                       $customhost{$key}[4] =$count;
                        &General::writehasharray("$confighost", \%customhost);
                        undef %customhost;
                        $fwhostsettings{'HOSTNAME'}='';
@@ -571,7 +566,7 @@ if ($fwhostsettings{'ACTION'} eq 'savehost')
 }
 if ($fwhostsettings{'ACTION'} eq 'savegrp')
 {
-       my $grp=$fwhostsettings{'grp_name'};;
+       my $grp=$fwhostsettings{'grp_name'};
        my $rem=$fwhostsettings{'remark'};
        my $count;
        my $type;
@@ -581,6 +576,9 @@ if ($fwhostsettings{'ACTION'} eq 'savegrp')
        &General::readhasharray("$configgrp", \%customgrp);
        &General::readhasharray("$confignet", \%customnetwork);
        &General::readhasharray("$confighost", \%customhost);
+       &General::readhasharray("$fwconfigfwd", \%fwfwd);
+       &General::readhasharray("$fwconfiginp", \%fwinp);
+       &General::readhasharray("$fwconfigout", \%fwout);
        #check name
        if (!&validhostname($grp)){$errormessage.=$Lang::tr{'fwhost err name'};}
        #check existing name
@@ -685,17 +683,6 @@ if ($fwhostsettings{'ACTION'} eq 'savegrp')
                }
                &General::writehasharray("$configgrp", \%customgrp);
                &General::readhasharray("$configgrp", \%customgrp);
-               #get count used
-               foreach my $key (keys %customgrp)
-               {
-                       if($customgrp{$key}[0] eq $grp)
-                       {
-                               $count=$customgrp{$key}[4];
-                               last;
-                       }
-               }
-               if ($count eq '' ){$count='0';}
-               
                #create array with new lines
                foreach my $line (@target){
                        push (@newgrp,"$grp,$rem,$line");
@@ -703,36 +690,21 @@ if ($fwhostsettings{'ACTION'} eq 'savegrp')
                #append new entries
                my $key = &General::findhasharraykey (\%customgrp);
                foreach my $line (@newgrp){
-                       foreach my $i (0 .. 4) { $customgrp{$key}[$i] = "";}
+                       foreach my $i (0 .. 3) { $customgrp{$key}[$i] = "";}
                        my ($a,$b,$c,$d) = split (",",$line);
                        $customgrp{$key}[0] = $a;
                        $customgrp{$key}[1] = $b;
                        $customgrp{$key}[2] = $c;
                        $customgrp{$key}[3] = $type;
-                       $customgrp{$key}[4] = $count;
                }
                &General::writehasharray("$configgrp", \%customgrp);
                #update counter in Host/Net
-               if($updcounter eq 'net'){
-                       foreach my $key (keys %customnetwork) {
-                               if($customnetwork{$key}[0] eq $fwhostsettings{'CUST_SRC_NET'}){
-                                       $customnetwork{$key}[4] = $customnetwork{$key}[4]+1;
-                                       last;
-                               }
-                       }
-                       &General::writehasharray("$confignet", \%customnetwork);
-               }elsif($updcounter eq 'host'){
-                       foreach my $key (keys %customhost) {
-                               if ($customhost{$key}[0] eq $fwhostsettings{'CUST_SRC_HOST'}){
-                                       $customhost{$key}[4]=$customhost{$key}[4]+1;
-                               }
-                       }
-                       &General::writehasharray("$confighost", \%customhost);
-               }
                $fwhostsettings{'update'}='on';
        }
                #check if ruleupdate is needed
-               if($count > 0 )
+               my $netgrpcount=0;
+               $netgrpcount=&getnetcount($grp);
+               if($netgrpcount > 0 )
                {
                        &General::firewall_config_changed();
                }
@@ -1128,6 +1100,52 @@ if ($fwhostsettings{'ACTION'} eq 'changesrvgrpremark')
        &addservicegrp;
        &viewtableservicegrp;
 }
+if ($fwhostsettings{'ACTION'} eq 'changesrvgrpname')
+{
+       &General::readhasharray("$configsrvgrp", \%customservicegrp );
+       if ($fwhostsettings{'oldsrvgrpname'} ne $fwhostsettings{'srvgrp'}){
+               #Check new groupname
+               if (!&validhostname($fwhostsettings{'srvgrp'})){
+                       $errormessage.=$Lang::tr{'fwhost err name'}."<br>";
+               }
+               if (!$errormessage){
+                       #Rename group in customservicegroup
+                       foreach my $key (keys %customservicegrp) {
+                               if($customservicegrp{$key}[0] eq $fwhostsettings{'oldsrvgrpname'}){
+                                       $customservicegrp{$key}[0]=$fwhostsettings{'srvgrp'};
+                               }
+                       }
+                       &General::writehasharray("$configsrvgrp", \%customservicegrp );
+                       #change name in FW Rules
+                       &changenameinfw($fwhostsettings{'oldsrvgrpname'},$fwhostsettings{'srvgrp'},15);
+               }
+       }
+       &addservicegrp;
+       &viewtableservicegrp;
+}
+if ($fwhostsettings{'ACTION'} eq 'changegrpname')
+{
+       &General::readhasharray("$configgrp", \%customgrp );
+       if ($fwhostsettings{'oldgrpname'} ne $fwhostsettings{'grp'}){
+               #Check new groupname
+               if (!&validhostname($fwhostsettings{'grp'})){
+                       $errormessage.=$Lang::tr{'fwhost err name'}."<br>";
+               }
+               if (!$errormessage){
+                       #Rename group in customservicegroup
+                       foreach my $key (keys %customgrp) {
+                               if($customgrp{$key}[0] eq $fwhostsettings{'oldgrpname'}){
+                                       $customgrp{$key}[0]=$fwhostsettings{'grp'};
+                               }
+                       }
+                       &General::writehasharray("$configgrp", \%customgrp );
+                       #change name in FW Rules
+                       &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},6);
+               }
+       }
+       &addgrp;
+       &viewtablegrp;
+}
 ###  VIEW  ###
 if($fwhostsettings{'ACTION'} eq '')
 {
@@ -1215,6 +1233,7 @@ sub addgrp
        $checked{'check1'}{'on'} = '';
        $checked{'grp2'}{$fwhostsettings{'grp2'}} = 'CHECKED';
        $fwhostsettings{'oldremark'}=$fwhostsettings{'remark'};
+       $fwhostsettings{'oldgrpname'}=$fwhostsettings{'grp_name'};
        my $grp=$fwhostsettings{'grp_name'};
        my $rem=$fwhostsettings{'remark'};
                if ($fwhostsettings{'update'} eq ''){   
@@ -1227,8 +1246,8 @@ END
                }else{
                        print<<END;
                        <table width='100%' border='0'><form method='post' style='display:inline'>
-                       <tr><td nowrap='nowrap' width='12%'>$Lang::tr{'fwhost addgrpname'}</td><td><input type='TEXT' name='grp'  value='$fwhostsettings{'grp_name'}' readonly ></td><td></td></tr>
-                       <tr><td>$Lang::tr{'remark'}:</td><td><input type='TEXT' name='newrem' size='45' value='$fwhostsettings{'remark'}' style='width:98%'></td><td align='right'><input type='submit' value='$Lang::tr{'fwhost change'}'><input type='hidden' name='oldrem' value='$fwhostsettings{'oldremark'}'><input type='hidden' name='ACTION' value='changegrpremark' ></td></tr></table></form>
+                       <tr><td nowrap='nowrap' width='12%'>$Lang::tr{'fwhost addgrpname'}</td><td width='20%'><input type='TEXT' name='grp'  value='$fwhostsettings{'grp_name'}' ></td><td><input type='submit' value='$Lang::tr{'fwhost change'}'><input type='hidden' name='oldgrpname' value='$fwhostsettings{'oldgrpname'}'><input type='hidden' name='ACTION' value='changegrpname'></td><td></td></form></tr>
+                       <tr><form method='post' style='display:inline'><td>$Lang::tr{'remark'}:</td><td colspan='2'><input type='TEXT' name='newrem' size='45' value='$fwhostsettings{'remark'}' style='width:98%'></td><td align='right'><input type='submit' value='$Lang::tr{'fwhost change'}'><input type='hidden' name='oldrem' value='$fwhostsettings{'oldremark'}'><input type='hidden' name='ACTION' value='changegrpremark' ></td></tr></table></form>
                        <hr>
 END
                }
@@ -1392,6 +1411,7 @@ sub addservicegrp
        &showmenu;
        &Header::openbox('100%', 'left', $Lang::tr{'fwhost addservicegrp'});
        $fwhostsettings{'oldsrvgrpremark'}=$fwhostsettings{'SRVGRP_REMARK'};
+       $fwhostsettings{'oldsrvgrpname'}=$fwhostsettings{'SRVGRP_NAME'};
        if ($fwhostsettings{'updatesrvgrp'} eq ''){
                print<<END;
                <table width='100%' border='0'><form method='post'>
@@ -1403,9 +1423,9 @@ END
        }else{
                print<<END;
                <table width='100%' border='0'><form method='post' style='display:inline'>
-               <tr><td width='10%'>$Lang::tr{'fwhost addgrpname'}</td><td><input type='text' name='srvgrp' value='$fwhostsettings{'SRVGRP_NAME'}' readonly  size='14'></td><td width='3%'></td></tr>
-               <tr><td width='10%'>$Lang::tr{'remark'}:</td><td><input type='text' name='newsrvrem'  value='$fwhostsettings{'SRVGRP_REMARK'}' style='width:98%;'></td><td align='right'><input type='submit' value='$Lang::tr{'fwhost change'}'><input type='hidden' name='oldsrvrem' value='$fwhostsettings{'oldsrvgrpremark'}'><input type='hidden' name='ACTION' value='changesrvgrpremark' ></td></tr>
-               <tr><td colspan='3'><br><hr></td></td></tr>
+               <tr><td width='10%'>$Lang::tr{'fwhost addgrpname'}</td><td width='20%'><input type='text' name='srvgrp' value='$fwhostsettings{'SRVGRP_NAME'}' size='14'></td><td align='left'><input type='submit' value='$Lang::tr{'fwhost change'}'><input type='hidden' name='oldsrvgrpname' value='$fwhostsettings{'oldsrvgrpname'}'><input type='hidden' name='ACTION' value='changesrvgrpname'></td><td width='3%'></td></form></tr>
+               <tr><form method='post'><td width='10%'>$Lang::tr{'remark'}:</td><td colspan='2'><input type='text' name='newsrvrem'  value='$fwhostsettings{'SRVGRP_REMARK'}' style='width:98%;'></td><td align='right'><input type='submit' value='$Lang::tr{'fwhost change'}'><input type='hidden' name='oldsrvrem' value='$fwhostsettings{'oldsrvgrpremark'}'><input type='hidden' name='ACTION' value='changesrvgrpremark' ></td></tr>
+               <tr><td colspan='4'><br><hr></td></td></tr>
                </table></form>
 END
        }
@@ -1450,6 +1470,10 @@ sub viewtablenet
        if(! -z $confignet){
                &Header::openbox('100%', 'left', $Lang::tr{'fwhost cust net'});
                &General::readhasharray("$confignet", \%customnetwork);
+               &General::readhasharray("$configgrp", \%customgrp);
+               &General::readhasharray("$fwconfigfwd", \%fwfwd);
+               &General::readhasharray("$fwconfiginp", \%fwinp);
+               &General::readhasharray("$fwconfigout", \%fwout);
                if (!keys %customnetwork) 
                { 
                        print "<center><b>$Lang::tr{'fwhost empty'}</b>"; 
@@ -1471,7 +1495,8 @@ END
                                print" <tr bgcolor='$color{'color20'}'>";
                        }
                        my $colnet="$customnetwork{$key}[1]/".&General::subtocidr($customnetwork{$key}[2]);
-                       print"<td width='20%'><form method='post'>$customnetwork{$key}[0]</td><td width='15%' align='center'>".&Header::colorize($colnet)."</td><td width='40%'>$customnetwork{$key}[3]</td><td align='center'>$customnetwork{$key}[4]x</td>";
+                       my $netcount=&getnetcount($customnetwork{$key}[0]);
+                       print"<td width='20%'><form method='post'>$customnetwork{$key}[0]</td><td width='15%' align='center'>".&Header::colorize($colnet)."</td><td width='40%'>$customnetwork{$key}[3]</td><td align='center'>$netcount x</td>";
                        print<<END;
                        <td width='1%'><input type='image' src='/images/edit.gif' align='middle' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} />
                        <input type='hidden' name='ACTION' value='editnet'>
@@ -1481,7 +1506,7 @@ END
                        <input type='hidden' name='NETREMARK' value='$customnetwork{$key}[3]' />
                        </td></form>
 END
-                       if($customnetwork{$key}[4] == '0')
+                       if($netcount == '0')
                        {
                                print"<td width='1%'><form method='post'><input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} /><input type='hidden' name='ACTION' value='delnet' /><input type='hidden' name='key' value='$customnetwork{$key}[0]' /></td></form></tr>";
                        }else{
@@ -1549,6 +1574,10 @@ sub viewtablehost
                &General::readhasharray("$confighost", \%customhost);
                &General::readhasharray("$configccdnet", \%ccdnet);
                &General::readhasharray("$configccdhost", \%ccdhost);
+               &General::readhasharray("$fwconfigfwd", \%fwfwd);
+               &General::readhasharray("$fwconfiginp", \%fwinp);
+               &General::readhasharray("$fwconfigout", \%fwout);
+               &General::readhasharray("$configgrp", \%customgrp);
                if (!keys %customhost) 
                { 
                        print "<center><b>$Lang::tr{'fwhost empty'}</b>"; 
@@ -1566,7 +1595,9 @@ END
                        else{            print" <tr bgcolor='$color{'color20'}'>";}
                        my ($ip,$sub)=split(/\//,$customhost{$key}[2]);
                        $customhost{$key}[4]=~s/\s+//g;
-                       print"<td width='20%'>$customhost{$key}[0]</td><td width='20%' align='center' ".&getcolor($ip).">".&Header::colorize($ip)."</td><td width='50%' align='left'>$customhost{$key}[3]</td><td align='center'>$customhost{$key}[4]x</td>";
+                       my $hostcount=0;
+                       $hostcount=&gethostcount($customhost{$key}[0]);
+                       print"<td width='20%'>$customhost{$key}[0]</td><td width='20%' align='center' ".&getcolor($ip).">".&Header::colorize($ip)."</td><td width='50%' align='left'>$customhost{$key}[3]</td><td align='center'>$hostcount x</td>";
                        print<<END;
                        <td width='1%'><form method='post'><input type='image' src='/images/edit.gif' align='middle' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} />
                        <input type='hidden' name='ACTION' value='edithost' />
@@ -1576,7 +1607,7 @@ END
                        <input type='hidden' name='HOSTREMARK' value='$customhost{$key}[3]' />
                        </form></td>
 END
-                       if($customhost{$key}[4] == '0')
+                       if($hostcount == '0')
                        {
                                print"<td width='1%'><form method='post'><input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} /><input type='hidden' name='ACTION' value='delhost' /><input type='hidden' name='key' value='$customhost{$key}[0]' /></td></form></tr>";
                        }else{
@@ -1598,6 +1629,9 @@ sub viewtablegrp
        &General::readhasharray("$configccdnet", \%ccdnet);
        &General::readhasharray("$confighost", \%customhost);
        &General::readhasharray("$confignet", \%customnetwork);
+       &General::readhasharray("$fwconfigfwd", \%fwfwd);
+       &General::readhasharray("$fwconfiginp", \%fwinp);
+       &General::readhasharray("$fwconfigout", \%fwout);
        my @grp=();
        my $helper='';
        my $count=1;
@@ -1606,7 +1640,7 @@ sub viewtablegrp
        my $number;
        my $delflag;
        if (!keys %customgrp) 
-       { 
+       {
                print "<center><b>$Lang::tr{'fwhost err emptytable'}</b>";
        }else{
                foreach my $key (sort { ncmp($customgrp{$a}[0],$customgrp{$b}[0]) } sort { ncmp($customgrp{$a}[2],$customgrp{$b}[2]) } keys %customgrp){
@@ -1629,8 +1663,9 @@ sub viewtablegrp
                                if($count gt 1){ print"</table>";}
                                print "<br><b><u>$grpname</u></b>&nbsp; &nbsp;";
                                print " <b>$Lang::tr{'remark'}:</b>&nbsp $remark &nbsp " if ($remark ne '');
-                               print "<b>$Lang::tr{'used'}:</b> $customgrp{$key}[4]x";
-                               if($customgrp{$key}[4] == '0')
+                               my $netgrpcount=&getnetcount($grpname);
+                               print "<b>$Lang::tr{'used'}:</b> $netgrpcount x";
+                               if($netgrpcount == '0')
                                {
                                        print"<form method='post' style='display:inline'><input type='image' src='/images/delete.gif' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} align='right' /><input type='hidden' name='grp_name' value='$grpname' ><input type='hidden' name='ACTION' value='delgrp'></form>";
                                }
@@ -1660,7 +1695,7 @@ sub viewtablegrp
                                $ip="$colip/".&General::subtocidr($colsub) if ($colsub);
                                print"<td align='center' ".&getcolor($colip).">".&Header::colorize($ip)."</td><td align='center'>$customgrp{$key}[3]</td><td width='1%'><form method='post'>";
                        }
-                       if ($delflag > '1' && $ip ne ''){
+                       if ($delflag > 1 && $ip ne ''){
                                print"<input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} />";
                        }
                        print"<input type='hidden' name='ACTION' value='deletegrphost'><input type='hidden' name='grpcnt' value='$customgrp{$key}[4]'><input type='hidden' name='update' value='$fwhostsettings{'update'}'><input type='hidden' name='delhost' value='$grpname,$remark,$customgrp{$key}[2],$customgrp{$key}[3]'></form></td></tr>";
@@ -1930,6 +1965,84 @@ sub get_name
                return "$network" if ($val eq $defaultNetworks{$network}{'NAME'});
        }       
 }
+sub gethostcount
+{
+       my $searchstring=shift;
+       my $srvcounter=0;
+       #Count services used in servicegroups
+       foreach my $key (keys %customgrp) {
+               if($customgrp{$key}[2] eq $searchstring){
+                       $srvcounter++;
+               }
+       }
+       #Count services used in firewall - config
+       foreach my $key1 (keys %fwfwd) {
+               if($fwfwd{$key1}[4] eq $searchstring){
+                       $srvcounter++;
+               }
+               if($fwfwd{$key1}[6] eq $searchstring){
+                       $srvcounter++;
+               }
+       }
+       #Count services used in firewall - input
+       foreach my $key2 (keys %fwinp) {
+               if($fwinp{$key2}[4] eq $searchstring){
+                       $srvcounter++;
+               }
+               if($fwinp{$key2}[6] eq $searchstring){
+                       $srvcounter++;
+               }
+       }
+       #Count services used in firewall - outgoing
+       foreach my $key3 (keys %fwout) {
+               if($fwout{$key3}[4] eq $searchstring){
+                       $srvcounter++;
+               }
+               if($fwout{$key3}[6] eq $searchstring){
+                       $srvcounter++;
+               }
+       }
+       return $srvcounter;
+}
+sub getnetcount
+{
+       my $searchstring=shift;
+       my $srvcounter=0;
+       #Count services used in servicegroups
+       foreach my $key (keys %customgrp) {
+               if($customgrp{$key}[2] eq $searchstring){
+                       $srvcounter++;
+               }
+       }
+       #Count services used in firewall - config
+       foreach my $key1 (keys %fwfwd) {
+               if($fwfwd{$key1}[4] eq $searchstring){
+                       $srvcounter++;
+               }
+               if($fwfwd{$key1}[6] eq $searchstring){
+                       $srvcounter++;
+               }
+       }
+       #Count services used in firewall - input
+       foreach my $key2 (keys %fwinp) {
+               if($fwinp{$key2}[4] eq $searchstring){
+                       $srvcounter++;
+               }
+               if($fwinp{$key2}[6] eq $searchstring){
+                       $srvcounter++;
+               }
+       }
+       #Count services used in firewall - outgoing
+       foreach my $key3 (keys %fwout) {
+               if($fwout{$key3}[4] eq $searchstring){
+                       $srvcounter++;
+               }
+               if($fwout{$key3}[6] eq $searchstring){
+                       $srvcounter++;
+               }
+       }
+       return $srvcounter;
+}
 sub getsrvcount
 {
        my $searchstring=shift;
@@ -2218,6 +2331,36 @@ sub decreaseservice
        &General::writehasharray("$configsrv", \%customservice);
        
 }
+sub changenameinfw
+{
+       my $old=shift;
+       my $new=shift;
+       my $fld=shift;
+       &General::readhasharray("$fwconfigfwd", \%fwfwd);
+       &General::readhasharray("$fwconfiginp", \%fwinp);
+       &General::readhasharray("$fwconfigout", \%fwout);
+       #Rename group in Firewall-CONFIG
+       foreach my $key1 (keys %fwfwd) {
+               if($fwfwd{$key1}[$fld] eq $old){
+                       $fwfwd{$key1}[$fld]=$new;
+               }
+       }
+       &General::writehasharray("$fwconfigfwd", \%fwfwd );
+       #Rename group in Firewall-INPUT
+       foreach my $key2 (keys %fwinp) {
+               if($fwinp{$key2}[$fld] eq $old){
+                       $fwinp{$key2}[$fld]=$new;
+               }
+       }
+       &General::writehasharray("$fwconfiginp", \%fwinp );
+       #Rename group in Firewall-OUTGOING
+       foreach my $key3 (keys %fwout) {
+               if($fwout{$key3}[$fld] eq $old){
+                       $fwout{$key3}[$fld]=$new;
+               }
+       }
+       &General::writehasharray("$fwconfigout", \%fwout );
+}
 sub checkports
 {
        
index b0b0724..e8fb995 100644 (file)
 'fwdfw dnat' => 'Destination-NAT (Port-Weiterleitung)',
 'fwdfw dnat error' => 'Für Destination-NAT muss ein einzelner Host als Ziel ausgewählt werden. Gruppen oder Netzwerke sind nicht erlaubt',
 'fwdfw dnat porterr' => 'Für NAT-Regeln muss ein einzelner Port oder Portbereich angegeben werden',
+'fwdfw dnat porterr2' => 'Externer Port (NAT) darf nur angegeben werden, wenn ein Ziel-Port definiert ist.',
 'fwdfw edit' => 'Bearbeiten',
 'fwdfw err nosrc' => 'Keine Quelle ausgewählt',
 'fwdfw err nosrcip' => 'Bitte Quell-IP-Adresse angeben',
index 0909226..8bbfff3 100644 (file)
 'fwdfw dnat' => 'Destination NAT (Port forwarding)',
 'fwdfw dnat error' => 'You have to select a single host for DNAT. Groups or networks are not allowed.',
 'fwdfw dnat porterr' => 'You have to select a single port or portrange (tcp/udp) for NAT',
+'fwdfw dnat porterr2' => 'Cannot use external port (NAT) when no destination port is defined.',
 'fwdfw edit' => 'Edit',
 'fwdfw err nosrc' => 'No source selected.',
 'fwdfw err nosrcip' => 'Please provide a source IP address.',
index 23a3558..a30c46b 100644 (file)
--- a/lfs/linux
+++ b/lfs/linux
 
 include Config
 
-VER        = 3.10.24
+VER        = 3.10.25
 
 RPI_PATCHES = linux-3.10.10-grsec-c1af7c6
-GRS_PATCHES = grsecurity-2.9.1-3.10.24-ipfire1.patch.xz
+GRS_PATCHES = grsecurity-2.9.1-3.10.25-ipfire1.patch.xz
 
 THISAPP    = linux-$(VER)
 DL_FILE    = linux-$(VER).tar.xz
@@ -74,9 +74,9 @@ $(DL_FILE)                            = $(URL_IPFIRE)/$(DL_FILE)
 rpi-patches-$(RPI_PATCHES).patch.xz    = $(URL_IPFIRE)/rpi-patches-$(RPI_PATCHES).patch.xz
 $(GRS_PATCHES)                         = $(URL_IPFIRE)/$(GRS_PATCHES)
 
-$(DL_FILE)_MD5                         = 4b1270dda167a0ee8bead2681e0a9965
+$(DL_FILE)_MD5                         = 762a030e6b927d855a7da3599381d6ee
 rpi-patches-$(RPI_PATCHES).patch.xz_MD5        = f55981853573236069db5ad9fb7a4bd9
-$(GRS_PATCHES)_MD5                     = c312b94bea5dc1f489451e856590a573
+$(GRS_PATCHES)_MD5                     = 3fa426c36c1faab3262ff68f166dbae2
 
 install : $(TARGET)
 
index b5ebcfb..f343a2f 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2007-2013  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        #
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 3.3.0
+VER        = 3.3.4
 
 THISAPP    = lm_sensors-$(VER)
 DL_FILE    = $(THISAPP).tar.bz2
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 5eb18d7531ead4f54f28a1133a606535
+$(DL_FILE)_MD5 = 60cfb98ab7a8915c3ac684af5459de2e
 
 install : $(TARGET)
 
index 544b3e1..7de005e 100644 (file)
@@ -34,8 +34,10 @@ case "$1" in
                        # pre scan and try to load modules
                        "yes" | /usr/sbin/sensors-detect > /dev/null
                        if [ -e /etc/sysconfig/lm_sensors ]; then
+
                                # Module load
-                               for modul in `cat /etc/sysconfig/lm_sensors | grep '^MODULE_' | cut -d"=" -s -f2`; do
+                               . /etc/sysconfig/lm_sensors
+                               for modul in $BUS_MODULES $HWMON_MODULES ; do
                                        modprobe $modul > /dev/null 2>&1;
                                done
                        fi
@@ -52,8 +54,10 @@ case "$1" in
                # Load sensor modules only first start
                if [ ! -e /var/lock/sensors_modules ]; then
                        touch /var/lock/sensors_modules
+
                        boot_mesg -n "Loading Sensor Modules: "
-                       for modul in `cat /etc/sysconfig/lm_sensors | grep '^MODULE_' | cut -d"=" -s -f2`; do
+                       . /etc/sysconfig/lm_sensors
+                       for modul in $BUS_MODULES $HWMON_MODULES ; do
                        modprobe $modul > /dev/null 2>&1;
                                if [ ${?} = 0 ]; then
                                        boot_mesg -n "$SUCCESS$modul$NORMAL ";