]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/fwhosts.cgi
FORWARD FIREWALL: Some Typos in language Files
[people/teissler/ipfire-2.x.git] / html / cgi-bin / fwhosts.cgi
index d39fe124b6aa68bf0b317dd810a71608524f6a6d..afb47fa3d78acabfebe14c363a8b2a118e14e447 100755 (executable)
@@ -96,7 +96,8 @@ if ($fwhostsettings{'ACTION'} eq 'updatenet' )
                        $fwhostsettings{'orgname'}              = $customnetwork{$key}[0];
                        $fwhostsettings{'orgip'}                = $customnetwork{$key}[1];
                        $fwhostsettings{'orgsub'}               = $customnetwork{$key}[2];
-                       $fwhostsettings{'count'}                = $customnetwork{$key}[3];
+                       $fwhostsettings{'netremark'}    = $customnetwork{$key}[3];
+                       $fwhostsettings{'count'}                = $customnetwork{$key}[4];
                        delete $customnetwork{$key};
                        
                }
@@ -119,7 +120,7 @@ if ($fwhostsettings{'ACTION'} eq 'updatehost')
                                $ip = $customhost{$key}[2];
                        }
                        $fwhostsettings{'orgip'} = $ip;
-                       $fwhostsettings{'count'} = $customhost{$key}[3];
+                       $fwhostsettings{'count'} = $customhost{$key}[4];
                        delete $customhost{$key};
                        &General::writehasharray("$confighost", \%customhost);
                }
@@ -230,6 +231,11 @@ if ($fwhostsettings{'ACTION'} eq 'savenet' )
                        $fwhostsettings{'NOCHECK'}      ='false';
                        $fwhostsettings{'error'}        ='on';
                }
+               #check remark
+               if ($fwhostsettings{'NETREMARK'} ne '' && !&validremark($fwhostsettings{'NETREMARK'})){
+                       $errormessage=$Lang::tr{'fwhost err remark'};
+                       $fwhostsettings{'error'}        ='on';
+               }
                #check if subnet is sigle host
                if(&General::iporsubtocidr($fwhostsettings{'SUBNET'}) eq '32')
                {
@@ -280,17 +286,19 @@ if ($fwhostsettings{'ACTION'} eq 'savenet' )
                        $customnetwork{$key}[0] = $fwhostsettings{'orgname'} ;
                        $customnetwork{$key}[1] = $fwhostsettings{'orgip'} ;
                        $customnetwork{$key}[2] = $fwhostsettings{'orgsub'};
-                       $customnetwork{$key}[3] = $fwhostsettings{'count'};
+                       $customnetwork{$key}[3] = $fwhostsettings{'NETREMARK'};
+                       $customnetwork{$key}[4] = $fwhostsettings{'count'};
                        &General::writehasharray("$confignet", \%customnetwork);
                        undef %customnetwork;
                }                       
                if (!$errormessage){
+                       
                        &General::readhasharray("$confignet", \%customnetwork);
                        if ($fwhostsettings{'ACTION'} eq 'updatenet'){
                                if ($fwhostsettings{'update'} == '0'){
                                        foreach my $key (keys %customnetwork) {
                                                if($customnetwork{$key}[0] eq $fwhostsettings{'orgname'}){
-                                                       $count=$customnetwork{$key}[3];
+                                                       $count=$customnetwork{$key}[4];
                                                        delete $customnetwork{$key};
                                                        last;
                                                }
@@ -340,22 +348,24 @@ if ($fwhostsettings{'ACTION'} eq 'savenet' )
                                }
                        }                                       
                        my $key = &General::findhasharraykey (\%customnetwork);
-                       foreach my $i (0 .. 3) { $customnetwork{$key}[$i] = "";}
+                       foreach my $i (0 .. 4) { $customnetwork{$key}[$i] = "";}
                        $fwhostsettings{'SUBNET'}       = &General::iporsubtocidr($fwhostsettings{'SUBNET'});
                        $customnetwork{$key}[0]         = $fwhostsettings{'HOSTNAME'};
                        #convert ip when leading '0' in byte
-                       $fwhostsettings{'IP'}=&General::ip2dec($fwhostsettings{'IP'});
-                       $fwhostsettings{'IP'}=&General::dec2ip($fwhostsettings{'IP'});
+                       $fwhostsettings{'IP'}           =&General::ip2dec($fwhostsettings{'IP'});
+                       $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]         = $count;
+                       $customnetwork{$key}[3]         = $fwhostsettings{'NETREMARK'};
+                       $customnetwork{$key}[4]         = $count;
                        &General::writehasharray("$confignet", \%customnetwork);
                        $fwhostsettings{'IP'}=$fwhostsettings{'IP'}."/".&General::iporsubtodec($fwhostsettings{'SUBNET'});
                        undef %customnetwork;
                        $fwhostsettings{'HOSTNAME'}='';
                        $fwhostsettings{'IP'}='';
                        $fwhostsettings{'SUBNET'}='';
+                       $fwhostsettings{'NETREMARK'}='';
                        #check if an edited net affected groups and need to reload rules
                        if ($needrules eq 'on'){
                                &rules;
@@ -400,6 +410,10 @@ if ($fwhostsettings{'ACTION'} eq 'savehost')
                                $errormessage=$Lang::tr{'fwhost err mac'};
                        }
                }
+               #check remark
+               if ($fwhostsettings{'HOSTREMARK'} ne '' && !&validremark($fwhostsettings{'HOSTREMARK'})){
+                       $errormessage=$Lang::tr{'fwhost err remark'};
+               }
                #CHECK IP-PART
                if ($fwhostsettings{'type'} eq 'ip'){
                        #check for subnet
@@ -426,7 +440,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 .. 3) { $customhost{$key}[$i] = "";}
+                       foreach my $i (0 .. 4) { $customhost{$key}[$i] = "";}
                        $customhost{$key}[0] = $fwhostsettings{'orgname'} ;
                        $customhost{$key}[1] = $fwhostsettings{'type'} ;
                        if($customhost{$key}[1] eq 'ip'){
@@ -434,7 +448,8 @@ if ($fwhostsettings{'ACTION'} eq 'savehost')
                        }else{
                                $customhost{$key}[2] = $fwhostsettings{'orgip'};
                        }
-                       $customhost{$key}[3] = $fwhostsettings{'count'};
+                       $customhost{$key}[3] = $fwhostsettings{'HOSTREMARK'};
+                       $customhost{$key}[4] = $fwhostsettings{'count'};
                        &General::writehasharray("$confighost", \%customhost);
                        undef %customhost;
                } 
@@ -480,7 +495,7 @@ if ($fwhostsettings{'ACTION'} eq 'savehost')
                                }
                        }
                        my $key = &General::findhasharraykey (\%customhost);
-                       foreach my $i (0 .. 3) { $customhost{$key}[$i] = "";}
+                       foreach my $i (0 .. 4) { $customhost{$key}[$i] = "";}
                        $customhost{$key}[0] = $fwhostsettings{'HOSTNAME'} ;
                        $customhost{$key}[1] = $fwhostsettings{'type'} ;
                        if ($fwhostsettings{'type'} eq 'ip'){
@@ -492,12 +507,14 @@ if ($fwhostsettings{'ACTION'} eq 'savehost')
                                $customhost{$key}[2] = $fwhostsettings{'IP'};
                        }
                        if($fwhostsettings{'newhost'} eq 'on'){$count=0;}
-                       $customhost{$key}[3] = $count;
+                       $customhost{$key}[3] = $fwhostsettings{'HOSTREMARK'};
+                       $customhost{$key}[4] =$count;
                        &General::writehasharray("$confighost", \%customhost);
                        undef %customhost;
                        $fwhostsettings{'HOSTNAME'}='';
                        $fwhostsettings{'IP'}='';
                        $fwhostsettings{'type'}='';
+                        $fwhostsettings{'HOSTREMARK'}='';
                        #check if we need to update rules while host was edited
                        if($needrules eq 'on'){
                                &rules;
@@ -527,10 +544,6 @@ if ($fwhostsettings{'ACTION'} eq 'savegrp')
        #check remark
        if ($rem ne '' && !&validremark($rem) && $fwhostsettings{'update'} ne 'on'){
                $errormessage.=$Lang::tr{'fwhost err remark'};
-               $fwhostsettings{'update'} = 'on';
-               $fwhostsettings{'remark'}=$fwhostsettings{'oldremark'};
-               &addgrp;
-               &viewtablegrp;
        }
        if ($fwhostsettings{'update'} eq 'on'){
                #check standard networks
@@ -659,7 +672,7 @@ if ($fwhostsettings{'ACTION'} eq 'savegrp')
                if($updcounter eq 'net'){
                        foreach my $key (keys %customnetwork) {
                                if($customnetwork{$key}[0] eq $fwhostsettings{'CUST_SRC_NET'}){
-                                       $customnetwork{$key}[3] = $customnetwork{$key}[3]+1;
+                                       $customnetwork{$key}[4] = $customnetwork{$key}[4]+1;
                                        last;
                                }
                        }
@@ -667,7 +680,7 @@ if ($fwhostsettings{'ACTION'} eq 'savegrp')
                }elsif($updcounter eq 'host'){
                        foreach my $key (keys %customhost) {
                                if ($customhost{$key}[0] eq $fwhostsettings{'CUST_SRC_HOST'}){
-                                       $customhost{$key}[3]=$customhost{$key}[3]+1;
+                                       $customhost{$key}[4]=$customhost{$key}[3]+1;
                                }
                        }
                        &General::writehasharray("$confighost", \%customhost);
@@ -872,7 +885,7 @@ if ($fwhostsettings{'ACTION'} eq 'deletegrphost')
                                &General::readhasharray("$confighost", \%customhost);
                                foreach my $key1 (keys %customhost){
                                        if ($customhost{$key1}[0] eq $customgrp{$key}[2]){
-                                               $customhost{$key1}[3] = $customhost{$key1}[3]-1;
+                                               $customhost{$key1}[4] = $customhost{$key1}[4]-1;
                                                last;
                                        }
                                }
@@ -884,7 +897,7 @@ if ($fwhostsettings{'ACTION'} eq 'deletegrphost')
                }
        }
        &General::writehasharray("$configgrp", \%customgrp);
-       &rules;
+       if ($fwhostsettings{'grpcnt'} > 0){&rules;}
        if ($fwhostsettings{'update'} eq 'on'){
                $fwhostsettings{'remark'}= $grpremark;
                $fwhostsettings{'grp_name'}=$grpname;
@@ -1000,7 +1013,7 @@ if ($fwhostsettings{'ACTION'} eq $Lang::tr{'fwhost newservicegrp'})
 if ($fwhostsettings{'ACTION'} eq 'changegrpremark')
 {
        &General::readhasharray("$configgrp", \%customgrp);
-       if ($fwhostsettings{'oldrem'} ne $fwhostsettings{'newrem'} && &validremark($fwhostsettings{'newrem'})){
+       if ($fwhostsettings{'oldrem'} ne $fwhostsettings{'newrem'} && (&validremark($fwhostsettings{'newrem'}) || $fwhostsettings{'newrem'} eq '')){
                foreach my $key (sort keys %customgrp)
                        {
                                #$customgrp{$key}[1]=~ s/\|/,/g;
@@ -1028,7 +1041,7 @@ if ($fwhostsettings{'ACTION'} eq 'changegrpremark')
 if ($fwhostsettings{'ACTION'} eq 'changesrvgrpremark')
 {
        &General::readhasharray("$configsrvgrp", \%customservicegrp );
-       if ($fwhostsettings{'oldsrvrem'} ne $fwhostsettings{'newsrvrem'} && &validremark($fwhostsettings{'newsrvrem'})){
+       if ($fwhostsettings{'oldsrvrem'} ne $fwhostsettings{'newsrvrem'} && (&validremark($fwhostsettings{'newsrvrem'}) || $fwhostsettings{'newsrvrem'} eq '')){
                foreach my $key (sort keys %customservicegrp)
                        {
                                #$customservicegrp{$key}[1]=~ s/\|/,/g;
@@ -1088,7 +1101,8 @@ sub addnet
        $fwhostsettings{'orgname'}=$fwhostsettings{'HOSTNAME'};
        print<<END;
        <table border='0' width='100%'><form method='post' style='display:inline'  >
-       <tr><td>$Lang::tr{'name'}:</td><td><input type='TEXT' name='HOSTNAME' id='textbox1' value='$fwhostsettings{'HOSTNAME'}' $fwhostsettings{'BLK_HOST'}><script>document.getElementById('textbox1').focus()</script></td><td>$Lang::tr{'fwhost netaddress'}</td><td><input type='TEXT' name='IP' value='$fwhostsettings{'IP'}' $fwhostsettings{'BLK_IP'} size='14'></td><td align='right'>$Lang::tr{'netmask'}:</td><td align='right'><input type='TEXT' name='SUBNET' value='$fwhostsettings{'SUBNET'}' $fwhostsettings{'BLK_IP'} size='14'></td></tr>
+       <tr><td>$Lang::tr{'name'}:</td><td><input type='TEXT' name='HOSTNAME' id='textbox1' value='$fwhostsettings{'HOSTNAME'}' $fwhostsettings{'BLK_HOST'}><script>document.getElementById('textbox1').focus()</script></td><td>$Lang::tr{'fwhost netaddress'}:</td><td><input type='TEXT' name='IP' value='$fwhostsettings{'IP'}' $fwhostsettings{'BLK_IP'} size='14'></td><td align='right'>$Lang::tr{'netmask'}:</td><td align='right'><input type='TEXT' name='SUBNET' value='$fwhostsettings{'SUBNET'}' $fwhostsettings{'BLK_IP'} size='14'></td></tr>
+       <tr><td>$Lang::tr{'remark'}:</td><td colspan='5'><input type='TEXT' name='NETREMARK' value='$fwhostsettings{'NETREMARK'}' size='64'></td></tr>
        <tr><td colspan='6'><hr></hr></td></tr><tr>
 END
        if ($fwhostsettings{'ACTION'} eq 'editnet' || $fwhostsettings{'error'} eq 'on')
@@ -1114,6 +1128,7 @@ END
        if ($fwhostsettings{'type'} eq 'mac'){print "<option value='mac' selected >MAC</option>";}else{print "<option value='mac' >MAC</option>";}
        print<<END;
        </option></select></td><td align='right' width='15%'>IP/MAC:</td><td align='right'><input type='TEXT' name='IP' value='$fwhostsettings{'IP'}' $fwhostsettings{'BLK_IP'} ></td></tr>
+       <tr><td>$Lang::tr{'remark'}:</td><td colspan='5'><input type='TEXT' name='HOSTREMARK' value='$fwhostsettings{'HOSTREMARK'}' size='64'></td></tr>
        <tr><td colspan='7'><br><br><b>$Lang::tr{'fwhost attention'}</b><br>$Lang::tr{'fwhost macwarn'}</td></tr>
        <tr><td colspan='7'><hr></hr></td></tr>
 END
@@ -1359,7 +1374,7 @@ sub viewtablenet
                }else{
                        print<<END;
                        <table border='0' width='100%'>
-                       <tr><td align='center'><b>$Lang::tr{'name'}</td><td align='center'><b>$Lang::tr{'fwhost netaddress'}</td><td align='center'><b>$Lang::tr{'netmask'}</td><td align='center'><b>$Lang::tr{'used'}</td><td></td><td width='3%'></td></tr>
+                       <tr><td align='center'><b>$Lang::tr{'name'}</td><td align='center'><b>$Lang::tr{'fwhost netaddress'}</td><td align='center'><b>$Lang::tr{'netmask'}</td><td align='center'><b>$Lang::tr{'remark'}</td><td align='center'><b>$Lang::tr{'used'}</td><td></td><td width='3%'></td></tr>
 END
                }
                my $count=0;
@@ -1374,15 +1389,16 @@ END
                                print" <tr bgcolor='$color{'color20'}'>";
                        }
                        print<<END;
-                       <td width='40%'><form method='post'>$customnetwork{$key}[0]</td><td width=25%'>$customnetwork{$key}[1]</td><td width='25%'>$customnetwork{$key}[2]</td><td align='center'>$customnetwork{$key}[3]x</td>
+                       <td width='20%'><form method='post'>$customnetwork{$key}[0]</td><td width=15%'>$customnetwork{$key}[1]</td><td width='15%'>$customnetwork{$key}[2]</td><td width='40%'>$customnetwork{$key}[3]</td><td align='center'>$customnetwork{$key}[4]x</td>
                        <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'>
                        <input type='hidden' name='HOSTNAME' value='$customnetwork{$key}[0]' />
                        <input type='hidden' name='IP' value='$customnetwork{$key}[1]' />
                        <input type='hidden' name='SUBNET' value='$customnetwork{$key}[2]' />
+                       <input type='hidden' name='NETREMARK' value='$customnetwork{$key}[3]' />
                        </td></form>
 END
-                       if($customnetwork{$key}[3] == '0')
+                       if($customnetwork{$key}[4] == '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{
@@ -1406,7 +1422,7 @@ sub viewtablehost
                }else{
                print<<END;
                <table border='0' width='100%'>
-               <tr><td align='center'><b>$Lang::tr{'name'}</td><td align='center'><b>$Lang::tr{'fwhost ip_mac'}</td><td align='center'><b>$Lang::tr{'used'}</td><td></td><td width='3%'></td></tr>
+               <tr><td align='center'><b>$Lang::tr{'name'}</td><td align='center'><b>$Lang::tr{'fwhost ip_mac'}</td><td align='center'><b>$Lang::tr{'remark'}</td><td align='center'><b>$Lang::tr{'used'}</td><td></td><td width='3%'></td></tr>
 END
        }
                my $count=0;
@@ -1416,17 +1432,18 @@ END
                        }elsif ($count % 2){ print" <tr bgcolor='$color{'color22'}'>";}
                        else{            print" <tr bgcolor='$color{'color20'}'>";}
                        my ($ip,$sub)=split(/\//,$customhost{$key}[2]);
-                       $customhost{$key}[3]=~s/\s+//g;
+                       $customhost{$key}[4]=~s/\s+//g;
                        print<<END;
-                       <td width='40%'><form method='post'>$customhost{$key}[0]</td><td width='50%'>$ip</td><td align='center'>$customhost{$key}[3]x</td>
+                       <td width='20%'><form method='post'>$customhost{$key}[0]</td><td width='20%'>$ip</td><td width='50%'>$customhost{$key}[3]</td><td align='center'>$customhost{$key}[4]x</td>
                        <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='edithost' />
                        <input type='hidden' name='HOSTNAME' value='$customhost{$key}[0]' />
                        <input type='hidden' name='IP' value='$ip' />
                        <input type='hidden' name='type' value='$customhost{$key}[1]' />
+                       <input type='hidden' name='HOSTREMARK' value='$customhost{$key}[3]' />
                        </td></form>
 END
-                       if($customhost{$key}[3] == '0')
+                       if($customhost{$key}[4] == '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{
@@ -1468,7 +1485,7 @@ sub viewtablegrp
                                        {
                                                $delflag++;
                                        }
-                                       if($delflag > 0){
+                                       if($delflag > 1){
                                                last;
                                        }
                                }
@@ -1511,7 +1528,7 @@ sub viewtablegrp
                        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='update' value='$fwhostsettings{'update'}'><input type='hidden' name='delhost' value='$grpname,$remark,$customgrp{$key}[2],$customgrp{$key}[3]'></form></td></tr>";
+                       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>";
                        
                        $helper=$customgrp{$key}[0];
                        $number++;
@@ -1571,6 +1588,7 @@ sub viewtableservicegrp
        my $helper;
        my $port;
        my $protocol;
+       my $delflag;
        if (! -z $configsrvgrp){
                &Header::openbox('100%', 'left', $Lang::tr{'fwhost cust srvgrp'});
                &General::readhasharray("$configsrvgrp", \%customservicegrp);
@@ -1592,6 +1610,8 @@ sub viewtableservicegrp
                                $grpname=$customservicegrp{$key}[0];
                                if ($customservicegrp{$key}[2] eq "none"){
                                        $customservicegrp{$key}[2]=$Lang::tr{'fwhost empty'};
+                                       $port='';
+                                       $protocol='';
                                }
                                $remark="$customservicegrp{$key}[1]";
                                if($count >=2){print"</table>";}
@@ -1747,10 +1767,9 @@ sub deletefromgrp
 }
 sub plausicheck
 {
-       
        my $edit=shift;
        #check hostname
-       if (!&General::validhostname($fwhostsettings{'HOSTNAME'}))
+       if (!&validhostname($fwhostsettings{'HOSTNAME'}))
        {
                $errormessage=$errormessage.$Lang::tr{'fwhost err name'};
                $fwhostsettings{'BLK_IP'}='readonly';
@@ -1758,7 +1777,6 @@ sub plausicheck
                if ($fwhostsettings{'update'} eq 'on'){$fwhostsettings{'ACTION'}=$edit;}
        }
        #check if name collides with CCD Netname
-
        &General::readhasharray("$configccdnet", \%ccdnet);
        foreach my $key (keys %ccdnet) {
                if($ccdnet{$key}[0] eq $fwhostsettings{'HOSTNAME'}){
@@ -1768,7 +1786,6 @@ sub plausicheck
                        last;
                }
        }
-
        #check if IP collides with CCD NetIP
        if ($fwhostsettings{'type'} ne 'mac'){
                &General::readhasharray("$configccdnet", \%ccdnet);
@@ -1783,9 +1800,6 @@ sub plausicheck
                        }
                }
        }
-       
-       
-       
        #check if name collides with CCD Hostname
        &General::readhasharray("$configccdhost", \%ccdhost);
        foreach my $key (keys %ccdhost) {
@@ -1835,8 +1849,6 @@ sub plausicheck
        {
                $errormessage=$errormessage."<br>".$Lang::tr{'fwhost err ipcheck'};
        }
-               
-       
        return;
 }
 sub getipforgroup
@@ -1954,6 +1966,7 @@ sub rules
 {
        if (!-f "${General::swroot}/fwhosts/reread"){
                system("touch ${General::swroot}/fwhosts/reread");
+               system("touch ${General::swroot}/forward/reread");
        }
 }
 sub reread_rules
@@ -1961,6 +1974,7 @@ sub reread_rules
        system ("/usr/local/bin/forwardfwctrl");
        if ( -f "${General::swroot}/fwhosts/reread"){
                system("rm ${General::swroot}/fwhosts/reread");
+               system("rm ${General::swroot}/forward/reread");
        }
        
 }
@@ -2059,7 +2073,7 @@ sub validhostname
        if (length ($hostname) < 1 || length ($hostname) > 63) {
                return 0;}
        # Only valid characters are a-z, A-Z, 0-9 and -
-       if ($hostname !~ /^[a-zA-ZäöüÖÄÜ0-9-_()\/\s]*$/) {
+       if ($hostname !~ /^[a-zA-ZäöüÖÄÜ0-9-_.;()\/\s]*$/) {
                return 0;}
        # First character can only be a letter or a digit
        if (substr ($hostname, 0, 1) !~ /^[a-zA-ZöäüÖÄÜ0-9]*$/) {
@@ -2078,13 +2092,13 @@ sub validremark
        if (length ($remark) < 1 || length ($remark) > 255) {
                return 0;}
        # Only valid characters are a-z, A-Z, 0-9 and -
-       if ($remark !~ /^[a-zäöüA-ZÖÄÜ0-9-.:;_\/\s]*$/) {
+       if ($remark !~ /^[a-zäöüA-ZÖÄÜ0-9-.:;\|_()\/\s]*$/) {
                return 0;}
        # First character can only be a letter or a digit
        if (substr ($remark, 0, 1) !~ /^[a-zäöüA-ZÖÄÜ0-9]*$/) {
                return 0;}
        # Last character can only be a letter or a digit
-       if (substr ($remark, -1, 1) !~ /^[a-zöäüA-ZÖÄÜ0-9.]*$/) {
+       if (substr ($remark, -1, 1) !~ /^[a-zöäüA-ZÖÄÜ0-9.:;_)]*$/) {
                return 0;}
        return 1;
 }