summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Bear <38406045+mjbear@users.noreply.github.com>2018-04-22 13:28:09 -0400
committerMichael Bear <38406045+mjbear@users.noreply.github.com>2018-04-22 13:28:09 -0400
commit8593cb31b687d7855789670c0b84bd26a46bf1fd (patch)
treee4c587bbff7f378750df721abbf5f6ac98894099
parent6a6155fe41ed278a09da9a50fcfc5cf5ded6dc97 (diff)
downloadvyatta-cfg-system-8593cb31b687d7855789670c0b84bd26a46bf1fd.tar.gz
vyatta-cfg-system-8593cb31b687d7855789670c0b84bd26a46bf1fd.zip
Added support for dnsmasq's log-queries debugging option
-rwxr-xr-xscripts/dns-forwarding/vyatta-dns-forwarding.pl12
-rw-r--r--templates/service/dns/forwarding/log-queries/node.def1
2 files changed, 12 insertions, 1 deletions
diff --git a/scripts/dns-forwarding/vyatta-dns-forwarding.pl b/scripts/dns-forwarding/vyatta-dns-forwarding.pl
index b5efd269..d289e434 100755
--- a/scripts/dns-forwarding/vyatta-dns-forwarding.pl
+++ b/scripts/dns-forwarding/vyatta-dns-forwarding.pl
@@ -63,7 +63,7 @@ sub dnsforwarding_get_values {
my $output = '';
my $config = new Vyatta::Config;
my $use_dnsmasq_conf = 0;
- my (@listen_interfaces, $cache_size, @use_nameservers, $use_system_nameservers, @use_dhcp_nameservers, @domain, $server, $ignore_hosts_file);
+ my (@listen_interfaces, $cache_size, @use_nameservers, $use_system_nameservers, @use_dhcp_nameservers, @domain, $server, $ignore_hosts_file, $log_queries);
$config->setLevel("service dns forwarding");
@@ -75,6 +75,9 @@ sub dnsforwarding_get_values {
@use_dhcp_nameservers = $config->returnOrigValues("dhcp");
@domain = $config->listOrigNodes("domain");
$ignore_hosts_file = $config->returnOrigValue("ignore-hosts-file");
+ if($config->existsOrig("log-queries")){
+ $log_queries = "true"
+ }
} else {
@listen_interfaces = $config->returnValues("listen-on");
@@ -84,6 +87,9 @@ sub dnsforwarding_get_values {
@use_dhcp_nameservers = $config->returnValues("dhcp");
@domain = $config->listNodes("domain");
$ignore_hosts_file = $config->exists("ignore-hosts-file");
+ if($config->exists("log-queries")){
+ $log_queries = "true"
+ }
}
if (@listen_interfaces != 0) {
@@ -107,6 +113,10 @@ sub dnsforwarding_get_values {
}
}
+ if (defined $log_queries) {
+ $output .= "log-queries\n";
+ }
+
if (defined($use_system_nameservers)) {
$use_dnsmasq_conf = 1;
my $sys_config = new Vyatta::Config;
diff --git a/templates/service/dns/forwarding/log-queries/node.def b/templates/service/dns/forwarding/log-queries/node.def
new file mode 100644
index 00000000..eac1ee92
--- /dev/null
+++ b/templates/service/dns/forwarding/log-queries/node.def
@@ -0,0 +1 @@
+help: DNS Query Logging (for debugging)