summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/services.inc8
-rwxr-xr-xusr/local/www/services_dnsmasq.php25
2 files changed, 33 insertions, 0 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index f953877..7ffb555 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -1547,6 +1547,14 @@ function services_dnsmasq_configure() {
if(!isset($config['system']['webgui']['nodnsrebindcheck']))
$dns_rebind = "--rebind-localhost-ok --stop-dns-rebind";
+ if (isset($config['dnsmasq']['strict_order'])) {
+ $args .= " --strict-order ";
+ }
+
+ if (isset($config['dnsmasq']['domain_needed'])) {
+ $args .= " --domain-needed ";
+ }
+
if ($config['dnsmasq']['custom_options']) {
foreach (preg_split('/\s+/', $config['dnsmasq']['custom_options']) as $c)
$args .= " --$c";
diff --git a/usr/local/www/services_dnsmasq.php b/usr/local/www/services_dnsmasq.php
index 8315b93..2313588 100755
--- a/usr/local/www/services_dnsmasq.php
+++ b/usr/local/www/services_dnsmasq.php
@@ -48,6 +48,8 @@ $pconfig['enable'] = isset($config['dnsmasq']['enable']);
$pconfig['regdhcp'] = isset($config['dnsmasq']['regdhcp']);
$pconfig['regdhcpstatic'] = isset($config['dnsmasq']['regdhcpstatic']);
$pconfig['dhcpfirst'] = isset($config['dnsmasq']['dhcpfirst']);
+$pconfig['strict_order'] = isset($config['dnsmasq']['strict_order']);
+$pconfig['domain_needed'] = isset($config['dnsmasq']['domain_needed']);
$pconfig['custom_options'] = $config['dnsmasq']['custom_options'];
if (!is_array($config['dnsmasq']['hosts']))
@@ -69,6 +71,8 @@ if ($_POST) {
$config['dnsmasq']['regdhcp'] = ($_POST['regdhcp']) ? true : false;
$config['dnsmasq']['regdhcpstatic'] = ($_POST['regdhcpstatic']) ? true : false;
$config['dnsmasq']['dhcpfirst'] = ($_POST['dhcpfirst']) ? true : false;
+ $config['dnsmasq']['strict_order'] = ($_POST['strict_order']) ? true : false;
+ $config['dnsmasq']['domain_needed'] = ($_POST['domain_needed']) ? true : false;
$config['dnsmasq']['custom_options'] = str_replace("\r\n", "\n", $_POST['custom_options']);
if ($config['dnsmasq']['custom_options']) {
@@ -192,6 +196,27 @@ function show_advanced_dns() {
</td>
</tr>
<tr>
+ <td rowspan="2" width="22%" valign="top" class="vncellreq"><?=gettext("DNS Query Forwarding");?></td>
+ <td width="78%" class="vtable"><p>
+ <input name="strict_order" type="checkbox" id="strict_order" value="yes" <?php if ($pconfig['strict_order'] == "yes") echo "checked";?>>
+ <strong><?=gettext("Query DNS servers sequentially");?><br>
+ </strong><?php printf(gettext("If this option is set, %s DNS Forwarder (dnsmasq) will ".
+ "query the DNS servers sequentially in the order specified (<i>System - General Setup - DNS Servers</i>), ".
+ "rather than all at once in parallel. ".
+ ""), $g['product_name']); ?></p>
+ </td>
+ </tr>
+ <tr>
+ <td width="78%" class="vtable"><p>
+ <input name="domain_needed" type="checkbox" id="domain_needed" value="yes" <?php if ($pconfig['domain_needed'] == "yes") echo "checked";?>>
+ <strong><?=gettext("Require domain");?><br>
+ </strong><?php printf(gettext("If this option is set, %s DNS Forwarder (dnsmasq) will ".
+ "not forward A or AAAA queries for plain names, without dots or domain parts, to upstream name servers. ".
+ "If the name is not known from /etc/hosts or DHCP then a \"not found\" answer is returned. ".
+ ""), $g['product_name']); ?></p>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Advanced");?></td>
<td width="78%" class="vtable"><p>
<div id="showadvbox" <?php if ($pconfig['custom_options']) echo "style='display:none'"; ?>>
OpenPOWER on IntegriCloud