#770481 dnsmasq-utils: dhcp_lease_time uses hardcoded 127.0.0.1 to connect to the dhcp server

Package:
dnsmasq-utils
Source:
dnsmasq
Description:
Utilities for manipulating DHCP leases
Submitter:
Lee Garrett
Date:
2014-11-21 16:00:05 UTC
Severity:
important
#770481#5
Date:
2014-11-21 15:57:35 UTC
From:
To:
I get the following error:

~$ dhcp_lease_time 10.32.1.23
Alarm clock

There are two problems with this:
1) The error message could be improved to something like "There was no response
from the DHCP server."
2) There *is* dnsmasq running on the local machine and responding to DHCP
requests (but not on the loopback address). This is because these options are
set:

listen-address=10.32.1.1
bind-interfaces

Running strace on dhcp_lease_time showed that it connects to 127.0.0.1, where no
DHCP server is running. I recommend changing the hardcoded default to a
commandline parameter, so you can use this tool for remote servers, too. Should
this not be viable, the documentation should be adjusted to point out that it
won't work unless dnsmasq listens on the loopback interface.

By the way, thanks for maintaining dnsmasq!

Regards,
Lee