Firewall: deleted subnet from source and target addresses if manually used
authorAlexander Marx <amarx@ipfire.org>
Mon, 6 Jan 2014 04:03:40 +0000 (05:03 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 6 Jan 2014 12:02:14 +0000 (13:02 +0100)
html/cgi-bin/firewall.cgi

index 538df60..8b02b04 100755 (executable)
@@ -1553,6 +1553,11 @@ sub newrule
                        }
                }       
        }
                        }
                }       
        }
+       # Split manual source and target address and delete the subnet
+       my ($sip,$scidr) = split("/",$fwdfwsettings{$fwdfwsettings{'grp1'}});
+       if ($scidr eq '32'){$fwdfwsettings{$fwdfwsettings{'grp1'}}=$sip;}
+       my ($dip,$dcidr) = split("/",$fwdfwsettings{$fwdfwsettings{'grp2'}});
+       if ($scidr eq '32'){$fwdfwsettings{$fwdfwsettings{'grp2'}}=$dip;}
        &Header::openbox('100%', 'left', $Lang::tr{'fwdfw addrule'});
        &Header::closebox();
        &Header::openbox('100%', 'left', $Lang::tr{'fwdfw source'});
        &Header::openbox('100%', 'left', $Lang::tr{'fwdfw addrule'});
        &Header::closebox();
        &Header::openbox('100%', 'left', $Lang::tr{'fwdfw source'});