]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
dns.cgi: Perform kdig tests only if the system is online.
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 8 Jan 2020 10:13:05 +0000 (11:13 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Wed, 8 Jan 2020 10:13:05 +0000 (11:13 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/dns.cgi

index 54f3aa3c426a796f5c95fcf2fe654b9cddcb5dce..4fecd342c74f323f51e015d030f4e43709fa3036 100755 (executable)
@@ -781,6 +781,11 @@ sub grab_address_from_file($) {
 sub check_nameserver($$$$) {
        my ($nameserver, $record, $proto, $tls_hostname) = @_;
 
+       # Check if the system is online.
+       unless (&red_is_active()) {
+               return "$Lang::tr{'system is offline'}";
+       }
+
        # Default values.
        my @command = ("kdig", "+timeout=2", "+retry=0", "+dnssec",
                "+bufsize=1232");