diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-04-23 13:40:50 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-04-23 13:40:50 +0000 |
commit | 20711d07232147887fed7dc3a393614b6ae143d7 (patch) | |
tree | 309cae6cd98c8a8405c2b2f167fb90682bfeb1e2 /package/dnsmasq/files | |
parent | aad7fd42b9deb0b957e64c6852f4ef98aecf0208 (diff) | |
download | upstream-20711d07232147887fed7dc3a393614b6ae143d7.tar.gz upstream-20711d07232147887fed7dc3a393614b6ae143d7.tar.bz2 upstream-20711d07232147887fed7dc3a393614b6ae143d7.zip |
[package] dnsmasq:
- when processing domain entries, append searchdomain to host entries if they are not fully qualified
- create only one reverse record for address entries with multiple names
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21109 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/dnsmasq/files')
-rw-r--r-- | package/dnsmasq/files/dnsmasq.init | 14 |
1 files changed, 11 insertions, 3 deletions
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 } |