]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - config/forwardfw/convert-outgoingfw
Forward Firewall: fixed converterbug and added ruleposition to new rules in forwardfw.cgi
[people/teissler/ipfire-2.x.git] / config / forwardfw / convert-outgoingfw
index a230598331c6d96ab83d7adfd31a5267a68dc151..edb1fd0a8cd19be450736aee300f1edd3e203422 100755 (executable)
@@ -54,7 +54,6 @@ sub process_groups
                        $ip =~ s/\s//gi;
                        print LOG "Check IP $ip from Group $group ";
                        my $val=&check_ip($ip);
-                       print "ALARM IP ist nun: $val"; ############################
                        if($val){
                                push(@hostarray,$val.",ip");
                                print LOG "-> OK\n";
@@ -102,16 +101,12 @@ sub check_ip
 {
        my $adr=shift;
        my $a;
-       
-       print "habe bekommen: $adr\n";#########################################
        #ip with subnet in decimal
        if($adr =~ m/^(\d\d?\d?).(\d\d?\d?).(\d\d?\d?).(\d\d?\d?)\/(\d{1,2})$/){
-               print "Bin drin, erkannt: cidr\n";################################
                $adr=int($1).".".int($2).".".int($3).".".int($4);
                my $b = &General::iporsubtodec($5);
                $a=$adr."/".$b;
        }elsif($adr =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/){
-               print "Hm erkannt ip ohne subnetz, ersetze es\n";#################
                $adr=int($1).".".int($2).".".int($3).".".int($4);
                if(&General::validip($adr)){
                        $a=$adr."/255.255.255.255";
@@ -209,7 +204,7 @@ sub new_hostgrp
        &General::writehasharray($confighosts,\%hosts);
        &General::writehasharray($configgroups,\%groups);
        &General::writehasharray($confignets,\%nets);
-       
+
 }
 sub check_host
 {
@@ -291,7 +286,7 @@ sub process_rules
                        }else{
                                push(@prot,$configline[3]);
                        }
-                       
+
                        if($configline[4] ne ''){ 
                                $configline[4] =~ s/,/;/g;
                                $remark = $configline[4];
@@ -557,5 +552,5 @@ sub build_ovpn_grp
 sub process_p2p
 {
        copy("/var/ipfire/outgoing/p2protocols","/var/ipfire/forward/p2protocols");
-       chmod oct(0777), '/var/ipfire/forward/p2protocols';
+       chmod oct('0777'), '/var/ipfire/forward/p2protocols';
 }