From: Stefan Schantl Date: Wed, 8 Jan 2020 10:13:05 +0000 (+0100) Subject: dns.cgi: Perform kdig tests only if the system is online. X-Git-Tag: v2.25-core141~70^2~32 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=70187da6a665120f1af623899a10b0b1eff670e3 dns.cgi: Perform kdig tests only if the system is online. Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi index 54f3aa3c42..4fecd342c7 100755 --- a/html/cgi-bin/dns.cgi +++ b/html/cgi-bin/dns.cgi @@ -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");