From 74759e49daa46acb4c0087d27452c1375f89d739 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 23 Apr 2010 13:43:57 +0000 Subject: [PATCH] merge r21109 SVN-Revision: 21110 --- package/dnsmasq/Makefile | 2 +- package/dnsmasq/files/dnsmasq.init | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile index abf0962c37..77b8f82a67 100644 --- a/package/dnsmasq/Makefile +++ b/package/dnsmasq/Makefile @@ -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 diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init index 47c4c2d2e6..15f856d4e5 100644 --- a/package/dnsmasq/files/dnsmasq.init +++ b/package/dnsmasq/files/dnsmasq.init @@ -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 } -- 2.30.2