[backfire] merge r22487, r22490, r22528, r22592 and r23270
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 6 Oct 2010 13:14:00 +0000 (13:14 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 6 Oct 2010 13:14:00 +0000 (13:14 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@23271 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/dnsmasq/Makefile
package/dnsmasq/files/dhcp.conf
package/dnsmasq/files/dnsmasq.init

index 977e1097097545aacda8e8acecebd2a5caf19e58..695d26088bf453d27d039590e1ac9c56f2687d34 100644 (file)
@@ -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
index c79458fb2be4e91213d3b55084db325e5cabd671..660b06ad4ff8e44e01bb872b6f0a4bd6fef07309 100644 (file)
@@ -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
index 2325a3e4ff482985981648245d93fedae1129155..d70547ac13aab3ff23ddbaa70275e3c3564c8b3e 100644 (file)
@@ -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