BUG10993: fix errormessage when editing static routes

When editing existing static routes and clicking on apply button, there
was an errormessage saying that this route is already in use.
Now the errormessage is only displayed if a new route has the same ip
than an existing one.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Alexander Marx
2015-12-07 14:36:31 +01:00
committed by Michael Tremer
parent b1372c3bef
commit 1e656e8adc

View File

@@ -149,7 +149,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
$temp[2] ='' unless defined $temp[2]; # not always populated
$temp[3] ='' unless defined $temp[2]; # not always populated
#Same ip already used?
if($temp[1] eq $settings{'IP'}){
if($temp[1] eq $settings{'IP'} && $settings{'KEY1'} eq ''){
$errormessage = $Lang::tr{'ccd err irouteexist'};
last;
}