diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi
index d35bc4eab..a16d6971d 100755
--- a/html/cgi-bin/dns.cgi
+++ b/html/cgi-bin/dns.cgi
@@ -87,11 +87,20 @@ if ($cgiparams{'GENERAL'} eq $Lang::tr{'save'}) {
$cgiparams{'ENABLE_SAFE_SEARCH'} = "off";
}
- # Store settings into settings file.
- &General::writehash("$settings_file", \%cgiparams);
+ # Check if using ISP nameservers and TLS is enabled at the same time.
+ if (($cgiparams{'USE_ISP_NAMESERVERS'} eq "on") && ($cgiparams{'PROTO'} eq "TLS")) {
+ $errormessage = $Lang::tr{'dns isp nameservers and tls not allowed'}
+ }
- # Call function to handle unbound restart, etc.
- &_handle_unbound_and_more()
+ # Check if there was an error.
+ if ( ! $errormessage) {
+
+ # Store settings into settings file.
+ &General::writehash("$settings_file", \%cgiparams);
+
+ # Call function to handle unbound restart, etc.
+ &_handle_unbound_and_more()
+ }
}
###
diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
index fb8644405..338110fa8 100644
--- a/langs/en/cgi-bin/en.pl
+++ b/langs/en/cgi-bin/en.pl
@@ -852,6 +852,7 @@
'dns forward disable dnssec' => 'Disable DNSSEC (dangerous)',
'dns forwarding dnssec disabled notice' => '(DNSSEC disabled)',
'dns header' => 'Assign DNS server addresses only for DHCP on red0',
+'dns isp nameservers and tls not allowed' => 'ISP-assigned DNS servers and TLS cannot be used at the same time.',
'dns isp assigned nameserver' => 'ISP-assigned DNS server',
'dns list' => 'List of free public DNS servers',
'dns menu' => 'Assign DNS Server',