$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()
+ }
}
###
# The first allowed id is 3 to keep space for
# possible ISP assigned DNS servers.
- if ($id le "2") {
+ if ($id <= "2") {
$id = "3";
}
}
$status = &check_nameserver("$nameserver", "ping.ipfire.org", "$settings{'PROTO'}", "$tls_hostname");
}
- if (!$status) {
+ if (!defined $status) {
$status_short = "$Lang::tr{'disabled'}";
# DNSSEC Not supported
# Private function to handle the restart of unbound and more.
sub _handle_unbound_and_more () {
# Restart unbound
- system('/usr/local/bin/unboundctrl restart >/dev/null');
+ system('/usr/local/bin/unboundctrl reload >/dev/null');
# Check if the IDS is running.
if(&IDS::ids_is_running()) {