From 96ea7162fc0c94d23cb9cb580c3e14be7910950d Mon Sep 17 00:00:00 2001
From: N0YB
Date: Mon, 4 Feb 2013 22:42:50 -0800
Subject: [PATCH] Services: DNS Forwarder
Add DNS query forwarding section with options for sequential and require domain.
---
etc/inc/services.inc | 8 ++++++++
usr/local/www/services_dnsmasq.php | 25 +++++++++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index f9538779a7..7ffb555235 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 8315b9324a..2313588547 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']) {
@@ -191,6 +195,27 @@ function show_advanced_dns() {
"affects the name given for a reverse lookup (PTR)."));?>
+
+
=gettext("DNS Query Forwarding");?>
+
+ >
+ =gettext("Query DNS servers sequentially");?>
+ System - General Setup - DNS Servers), ".
+ "rather than all at once in parallel. ".
+ ""), $g['product_name']); ?>