1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 00:14:05 +02:00

dnsmasq startup script update: add notinterface parameter

This tiny patch makes the dnsmasq init.d script listen to a parameter called "notinterface", which tells dnsmasq to not listen on a defined set of interfaces.

By default dnsmasq *always* listens on the loopback interface, even if you tell it to specifically listen on a certain other interface. Sometimes this is not desirable behaviour, so you might want to turn it off. This is useful when, for example, you want to have your own DNS server listening on the loopback interface.

Signed-off-by: Johnny Halfmoon <jhalfmoon at milksnot.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17599 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2009-09-16 18:15:31 +00:00
parent 220c2d388d
commit 5949fd8b7c
2 changed files with 7 additions and 1 deletions

View File

@ -12,8 +12,9 @@ config dnsmasq
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
#list server '/mycompany.local/1.2.3.4'
#option nonwildcard 0
#option nonwildcard 1
#list interface br-lan
#list notinterface lo
config dhcp lan
option interface lan

View File

@ -44,6 +44,10 @@ append_interface() {
append args "-i $1"
}
append_notinterface() {
append args "-I $1"
}
dnsmasq() {
local cfg="$1"
append_bool "$cfg" authoritative "-K"
@ -73,6 +77,7 @@ dnsmasq() {
append_parm "$cfg" "local" "-S"
config_list_foreach "$cfg" "server" append_server
config_list_foreach "$cfg" "interface" append_interface
config_list_foreach "$cfg" "notinterface" append_notinterface
append_parm "$cfg" "leasefile" "-l"
append_parm "$cfg" "resolvfile" "-r"
append_parm "$cfg" "tftp_root" "--tftp-root"