summaryrefslogtreecommitdiff
path: root/package/network/services/dnsmasq
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/services/dnsmasq')
-rw-r--r--package/network/services/dnsmasq/Makefile2
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init5
2 files changed, 5 insertions, 2 deletions
diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile
index ae3662b..02712bd 100644
--- a/package/network/services/dnsmasq/Makefile
+++ b/package/network/services/dnsmasq/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmasq
PKG_VERSION:=2.66
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 561f89d..ca3bb52 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -408,6 +408,9 @@ dhcp_domain_add() {
[ -n "$ip" ] || return 0
for name in $names; do
+ [ "${name%.*}" == "$name" ] && \
+ name="$name${DOMAIN:+.$DOMAIN}"
+
record="${record:+$record/}$name"
done
@@ -531,7 +534,7 @@ start_service() {
# add own hostname
[ $ADD_LOCAL_HOSTNAME -eq 1 ] && [ -n "$lanaddr" ] && {
local hostname="$(uci_get system @system[0] hostname OpenWrt)"
- dhcp_hostrecord_add "" "$hostname${DOMAIN:+.$DOMAIN $hostname}" "$lanaddr"
+ dhcp_hostrecord_add "" "${hostname%.$DOMAIN}${DOMAIN:+.$DOMAIN ${hostname%.$DOMAIN}}" "$lanaddr"
}
echo >> $CONFIGFILE