dnsmasq: fix backward compatibility with existing configs
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 4 Nov 2013 22:40:56 +0000 (22:40 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 4 Nov 2013 22:40:56 +0000 (22:40 +0000)
commita193e1c1ebb51eef54dabb8c449c40997489ad12
tree1716c15a4af39e777505184afc85ec6a0b05ddbf
parent355c50d67cd27db3e0e0d7e94f7d06c41abde457
dnsmasq: fix backward compatibility with existing configs

Changeset r36943 ("dnsmasq: use host-record instead of address") removed
the automatic domain expansion for config domain sections, this breaks
existing setups and alters the old behaviour in unexpected ways, therfore
restore behaviour of the current stable release.

Additionally handle fully qualified hostnames properly when setting up the
own hostrecord by stripping the local domain part form the given name
instead of unconditionally appending it, so that "example.lan" results
in "example example.lan" and not "example.lan example.lan.lan".

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38648 3c298f89-4303-0410-b956-a3cf2f4a3e73
package/network/services/dnsmasq/Makefile
package/network/services/dnsmasq/files/dnsmasq.init