From 664fc7bbdde170b3c9431ac2e3442a04cb029ddc Mon Sep 17 00:00:00 2001 From: Augusto Bott Date: Tue, 6 Sep 2011 16:16:54 +0700 Subject: [PATCH] Bugfix: hostnames from static DHCP * fixes hostname-based resolution for hosts on the static DHCP list * extra chars were being appended to the hostnames on /etc/hosts.dnsmasq ('<0' or '<1') (caused by a bug introduced on the last commit, related to the new field on dhcpd_static) --- release/src/router/rc/services.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release/src/router/rc/services.c b/release/src/router/rc/services.c index 9013220e96..f33e259bc6 100644 --- a/release/src/router/rc/services.c +++ b/release/src/router/rc/services.c @@ -288,6 +288,10 @@ void start_dnsmasq() name = e + 1; + if ((e = strchr(name, '<')) != NULL) { + *e = 0; + } + if ((hf) && (*name != 0)) { fprintf(hf, "%s %s\n", ip, name); } -- 2.11.4.GIT