merge r21109
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 23 Apr 2010 13:43:57 +0000 (13:43 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 23 Apr 2010 13:43:57 +0000 (13:43 +0000)
SVN-Revision: 21110

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

index abf0962c37eebc5ed92eaa64cb75dae067b52b1e..77b8f82a6720bb856955ee7c35f60a06bdee1bd8 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
 PKG_VERSION:=2.52
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
index 47c4c2d2e6ceb855b6926829e5f02c10a82e8443..15f856d4e58d7f80d1d3ac739f0c015381d8fa7a 100644 (file)
@@ -296,9 +296,17 @@ dhcp_domain_add() {
        local raddr="${4:+$4.$3.$2.$1.in-addr.arpa}"
 
        for name in $names; do
-               append args "-A /$name/$ip"
-               [ -n "$raddr" ] && \
-                       append args "--ptr-record=$raddr,$name"
+               local fqdn="$name"
+
+               [ "${fqdn%.*}" == "$fqdn" ] && \
+                       fqdn="$fqdn${DOMAIN:+.$DOMAIN}"
+
+               append args "-A /$fqdn/$ip"
+               
+               [ -n "$raddr" ] && {
+                       append args "--ptr-record=$raddr,$fqdn"
+                       raddr=""
+               }
        done
 }