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 | 6f5203228f32eb66db5f5c1e87066301d1ce0d9b (patch) | |
tree | f7e7373218a2fe2bdbd7e154763c57e7233fa16c /package/dnsmasq/files | |
parent | 819114e3f29079c52075e16fd9aa95b5adc62da1 (diff) | |
download | mtk-20170518-6f5203228f32eb66db5f5c1e87066301d1ce0d9b.zip mtk-20170518-6f5203228f32eb66db5f5c1e87066301d1ce0d9b.tar.gz mtk-20170518-6f5203228f32eb66db5f5c1e87066301d1ce0d9b.tar.bz2 |
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
SVN-Revision: 21109
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 47c4c2d..15f856d 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 } |