From 91adc5c16f8293a9f4680e79e4d0aa2d8903eee1 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 8 May 2007 16:20:25 +0000 Subject: Sometimes people have local domains which they do not want forwarded to upstream servers. This is accomodated by using server options without the server IP address. To make things clearer local is a synonym for server. For example the option local=/localnet/ ensures that any domain name query which ends in .localnet will be answered if possible from /etc/hosts or DHCP, but never sent to an upstream server. Ticket #1190 --- etc/inc/services.inc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'etc') diff --git a/etc/inc/services.inc b/etc/inc/services.inc index a95e22a..f6fd5f6 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -613,6 +613,12 @@ function services_dnsmasq_configure() { } } + /* suppose that dnsmasq handles our domain and don't send + requests for our local domain to upstream servers */ + if (!empty($config['system']['domain'])) { + $args .= sprintf(' --local=/%s/', $config['system']['domain']); + } + /* run dnsmasq */ mwexec("/usr/local/sbin/dnsmasq {$args}"); -- cgit v1.1