From 0d73c8fa9c09d6825e081a4e1eccb060e0719d08 Mon Sep 17 00:00:00 2001 From: jow Date: Wed, 6 Oct 2010 13:14:00 +0000 Subject: [PATCH] [backfire] merge r22487, r22490, r22528, r22592 and r23270 git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@23271 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/dnsmasq/Makefile | 2 +- package/dnsmasq/files/dhcp.conf | 3 ++- package/dnsmasq/files/dnsmasq.init | 14 +++++++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile index 977e10970..695d26088 100644 --- a/package/dnsmasq/Makefile +++ b/package/dnsmasq/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq PKG_VERSION:=2.55 -PKG_RELEASE:=3 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq diff --git a/package/dnsmasq/files/dhcp.conf b/package/dnsmasq/files/dhcp.conf index c79458fb2..660b06ad4 100644 --- a/package/dnsmasq/files/dhcp.conf +++ b/package/dnsmasq/files/dhcp.conf @@ -4,7 +4,7 @@ config dnsmasq option filterwin2k 0 # enable for dial on demand option localise_queries 1 option rebind_protection 1 # disable if upstream must serve RFC1918 addresses - option rebind_localhost 0 # enable for RBL checking and similar services + option rebind_localhost 1 # enable for RBL checking and similar services #list rebind_domain example.lan # whitelist RFC1918 responses for domains option local '/lan/' option domain 'lan' @@ -18,6 +18,7 @@ config dnsmasq #option nonwildcard 1 #list interface br-lan #list notinterface lo + #list bogusnxdomain '64.94.110.11' config dhcp lan option interface lan diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init index 2325a3e4f..d70547ac1 100644 --- a/package/dnsmasq/files/dnsmasq.init +++ b/package/dnsmasq/files/dnsmasq.init @@ -42,17 +42,23 @@ append_server() { } append_interface() { - append args "-i $1" + local ifname=$(uci_get_state network "$1" ifname "$1") + append args "-i $ifname" } append_notinterface() { - append args "-I $1" + local ifname=$(uci_get_state network "$1" ifname "$1") + append args "-I $ifname" } append_addnhosts() { append args "-H $1" } +append_bogusnxdomain() { + append args "-B $1" +} + dnsmasq() { local cfg="$1" append_bool "$cfg" authoritative "-K" @@ -72,6 +78,7 @@ dnsmasq() { append_bool "$cfg" enable_tftp "--enable-tftp" append_bool "$cfg" nonwildcard "-z" + append_parm "$cfg" cachesize "-c" append_parm "$cfg" dnsforwardmax "-0" append_parm "$cfg" port "-p" append_parm "$cfg" ednspacket_max "-P" @@ -83,6 +90,7 @@ dnsmasq() { config_list_foreach "$cfg" "interface" append_interface config_list_foreach "$cfg" "notinterface" append_notinterface config_list_foreach "$cfg" "addnhosts" append_addnhosts + config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain append_parm "$cfg" "leasefile" "-l" append_parm "$cfg" "resolvfile" "-r" append_parm "$cfg" "tftp_root" "--tftp-root" @@ -94,7 +102,7 @@ dnsmasq() { [ "$readethers" = "1" ] && [ -e "/etc/ethers" ] || touch /etc/ethers config_get leasefile $cfg leasefile - [ -e "$leasefile" ] || touch "$leasefile" + [ -n "$leasefile" ] && ([ -e "$leasefile" ] || touch "$leasefile") config_get_bool cachelocal "$cfg" cachelocal 1 config_get hostsfile "$cfg" dhcphostsfile -- 2.35.1