[backfire] merge r20656 (#7048)
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 3 Apr 2010 13:43:31 +0000 (13:43 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 3 Apr 2010 13:43:31 +0000 (13:43 +0000)
SVN-Revision: 20670

package/dnsmasq/Makefile
package/dnsmasq/files/dnsmasq.init

index 098728e7b0c657612770d5fc8a692bc94fa9817d..895a5c29533054c7f551eee07632bbb28e8cbf8d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
 PKG_VERSION:=2.52
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
index 1b6dee426a2b669fbbaafcca4423e108c69652dc..4cd941cfd72d01e9a6d24f2c6d92b3babb38cfd3 100644 (file)
@@ -284,16 +284,22 @@ dhcp_option_add() {
 
 dhcp_domain_add() {
        local cfg="$1"
+       local ip name names
 
-       config_get name "$cfg" name
-       [ -n "$name" ] || return 0
+       config_get names "$cfg" name
+       [ -n "$names" ] || return 0
 
        config_get ip "$cfg" ip
        [ -n "$ip" ] || return 0
 
        local oIFS="$IFS"; IFS="."; set -- $ip; IFS="$oIFS"
-       append args "-A /$name${DOMAIN:+.$DOMAIN}/$ip"
-       append args "--ptr-record=$4.$3.$2.$1.in-addr.arpa,$name${DOMAIN:+.$DOMAIN}"
+       local raddr="${4:+$4.$3.$2.$1.in-addr.arpa}"
+
+       for name in $names; do
+               append args "-A /$name${DOMAIN:+.$DOMAIN}/$ip"
+               [ -n "$raddr" ] && \
+                       append args "--ptr-record=$raddr,$name${DOMAIN:+.$DOMAIN}"
+       done
 }
 
 start() {