]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
dns.cgi: Fix id compare when adding a new nameserver.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 13 Jan 2020 09:42:56 +0000 (10:42 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Mon, 13 Jan 2020 09:42:56 +0000 (10:42 +0100)
I do not know why perl when using "le" which means "less-or-equal"
defines a "10" as "1".

This commit fixes the issue that it was not possible to add more than 8
nameservers.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/dns.cgi

index ae7d4efa235123985e85590587ee6ef235bfa4ab..d35bc4eabba600cccc1938ae2fd697a69b566d39 100755 (executable)
@@ -168,7 +168,7 @@ if (($cgiparams{'SERVERS'} eq $Lang::tr{'save'}) || ($cgiparams{'SERVERS'} eq $L
 
                        # The first allowed id is 3 to keep space for
                        # possible ISP assigned DNS servers.
-                       if ($id le "2") {
+                       if ($id <= "2") {
                                $id = "3";
                        }
                }