From: Alexander Marx Date: Mon, 7 Dec 2015 13:36:31 +0000 (+0100) Subject: BUG10993: fix errormessage when editing static routes X-Git-Tag: v2.17-core97~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e656e8adccae48639e3ce66a50b85017cadf75b;p=ipfire-2.x.git 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 Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi index 7636d1ec59..15989bd27d 100644 --- a/html/cgi-bin/routing.cgi +++ b/html/cgi-bin/routing.cgi @@ -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; }