openwrtv3/package/network/services
John Crispin 5046209312 dnsmasq: Fix hosts file format when MAC address is not specified
An entry like this in /etc/config/dhcp:

    config 'host'
        option 'name' 'pc2'
        option 'ip' '192.168.100.56'
        option 'dns' '1'

results in a /tmp/hosts/dhcp entry that looks like this:

    192.168.100.56 .lan

Obviously it should say "pc2.lan".

This happens because $name is set to "" in order to support the MAC-less
syntax: "--dhcp-host=lap,192.168.0.199".  Fix this by reordering the
operations.  Also, refuse to add a DNS entry if the hostname or IP is
missing.

Fixes #17683

Reported-by: Kostas Papadopoulos <kpapad75@travelguide.gr>
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>

SVN-Revision: 42319
2014-08-28 06:27:53 +00:00
..
authsae authsae: Update to latest version 2014-04-27 20:49:14 +00:00
dnsmasq dnsmasq: Fix hosts file format when MAC address is not specified 2014-08-28 06:27:53 +00:00
dropbear package/*: remove useless explicit set of function returncode 2014-08-25 06:35:50 +00:00
ead ead: clean up 2014-03-21 15:54:59 +00:00
hostapd hostapd: fix some whitespaces 2014-08-11 08:44:48 +00:00
igmpproxy igmpproxy: add missing include 2014-08-03 10:45:31 +00:00
ipset-dns procd: convert various packages to procd style init.d scripts 2013-09-17 21:45:30 +00:00
lldpd lldpd: build without libreadline 2014-01-29 13:10:39 +00:00
mdns mdns: add the new openwrt mdns daemon 2014-06-26 11:43:34 +00:00
odhcpd odhcpd: fix static lease behavior with dhcpv4 2014-08-24 08:12:57 +00:00
openvpn openvpn: fix compile error with musl 2014-06-30 15:34:03 +00:00
openvpn-easy-rsa openvpn-easy-rsa: restore essential patch to make it actually work on the target (#14324) 2013-10-15 12:23:21 +00:00
ppp ppp: enable IPv6CP by default 2014-08-13 10:18:20 +00:00
relayd package/*: remove useless explicit set of function returncode 2014-08-25 06:35:50 +00:00
samba36 samba36: update to minor version 3.6.24 2014-07-06 11:23:13 +00:00
uhttpd uhttpd: do not configure TLS parameters if libustream-ssl is not present 2014-08-25 12:39:34 +00:00