From 70187da6a665120f1af623899a10b0b1eff670e3 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Wed, 8 Jan 2020 11:13:05 +0100 Subject: [PATCH] dns.cgi: Perform kdig tests only if the system is online. Signed-off-by: Stefan Schantl --- html/cgi-bin/dns.cgi | 5 +++++ 1 file changed, 5 insertions(+) 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"); -- 2.39.5