]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
BUG10993: fix errormessage when editing static routes
authorAlexander Marx <alexander.marx@ipfire.org>
Mon, 7 Dec 2015 13:36:31 +0000 (14:36 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Dec 2015 16:37:22 +0000 (16:37 +0000)
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>
html/cgi-bin/routing.cgi

index 7636d1ec59d45fa8fe2804bcb68231ec454e8d98..15989bd27dad212e0881d1bfd973a0ee9df019b4 100644 (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;
                }