diff options
-rwxr-xr-x | scripts/dns-forwarding/vyatta-dns-forwarding.pl | 12 | ||||
-rw-r--r-- | templates/service/dns/forwarding/log-queries/node.def | 1 |
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) |