diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-05-08 16:20:25 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-05-08 16:20:25 +0000 |
commit | 91adc5c16f8293a9f4680e79e4d0aa2d8903eee1 (patch) | |
tree | c28d6da198804e7806d4d0a466f3853b1f2b3076 /etc/inc | |
parent | ad1719997b25299696078eb7c2d8329d8bc8f84d (diff) | |
download | pfsense-91adc5c16f8293a9f4680e79e4d0aa2d8903eee1.zip pfsense-91adc5c16f8293a9f4680e79e4d0aa2d8903eee1.tar.gz |
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
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/services.inc | 6 |
1 files changed, 6 insertions, 0 deletions
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}"); |