Commit Graph

44 Commits

Author SHA1 Message Date
Petr Menšík
6fe436a448 Report error on dhcp_release
If no IPv4 address is present on given interface, the tool would not
send any request. It would not report any error at the same time. Report
error if request send failed.

Signed-off-by: Petr Mensik <pemensik@redhat.com>
2019-10-07 18:19:19 +01:00
Brian Haley
d9f882bea2 Change dhcp_release to use default address when no IP subnet matches
Currently, dhcp_release will only send a 'fake' release
when the address given is in the same subnet as an IP
on the interface that was given.

This doesn't work in an environment where dnsmasq is
managing leases for remote subnets via a DHCP relay, as
running dhcp_release locally will just cause it to
silently exit without doing anything, leaving the lease
in the database.

Change it to use the default IP on the interface, as the
dnsmasq source code at src/dhcp.c does, if no matching subnet
IP is found, as a fall-back.  This fixes an issue we are
seeing in certain Openstack deployments where we are using
dnsmasq to provision baremetal systems in a datacenter.

While using Dbus might have seemed like an obvious solution,
because of our extensive use of network namespaces (which
Dbus doesn't support), this seemed like a better solution
than creating system.d policy files for each dnsmasq we
might spawn and using --enable-dbus=$id in order to isolate
messages to specific dnsmasq instances.

Signed-off-by: Brian Haley <haleyb.dev@gmail.com>
2019-08-30 21:21:57 +01:00
Simon Kelley
225accd235 Fix breakage of dhcp_lease_time utility. 2019-08-14 21:52:50 +01:00
Simon Kelley
7ef55691a2 Replace ash shell with dash in contrib/reverse-dns. 2019-04-08 17:17:07 +01:00
Petr Menšík
2b38e3823b Minor improvements in lease-tools
Limit max interface name to fit into buffer.
Make sure pointer have to be always positive.
Close socket after received reply.
2018-09-04 22:36:23 +01:00
Ville Skyttä
faaf306a63 Spelling fixes. 2018-01-14 17:32:52 +00:00
Simon Kelley
a6cee69af4 Fix exit code from dhcp_release6. 2017-12-14 22:40:48 +00:00
Simon Kelley
0039920ab6 Severely fix code formating of contrib/lease-tools/dhcp_release6.c 2017-12-14 22:29:31 +00:00
Rasmus Ahlberg
96e063c43d Update contrib/try-all-ns. 2017-09-25 17:30:59 +01:00
Rosen Penev
cbd29e5da8 Printf related fixes. 2017-06-27 22:29:51 +01:00
klemens
43517fcaf5 Spelling fixes. 2017-02-19 15:53:37 +00:00
Josh Soref
730c6745f0 Comprehensive spelling/typo fixes.
Thanks to Josh Soref for generating these fixes.
2017-02-06 16:14:04 +00:00
Sergey Nechaev
45cb8dd9be Stricter command line args validation to dhcp_release6. 2016-05-14 21:36:15 +01:00
Simon Kelley
69cbf78bb6 Add contrib/lease-tools/dhcp_release6 2016-05-03 21:33:38 +01:00
Simon Kelley
c6cdf6bbee Move dhcp_release and dhcp_lease_time to contrib/lease_tools. 2016-05-03 21:14:14 +01:00
Moshe Levi
a006eb7e14 Check IP address command line arg in dhcp_release.c 2015-04-19 22:10:40 +01:00
Simon Kelley
4c960fa90a New version of contrib/reverse-dns 2015-03-04 20:32:26 +00:00
Joachim Zobel
47b9ac59c7 Log parsing utils in contrib/reverse-dns 2015-02-23 21:38:11 +00:00
Simon Danner
b06900d1a3 Mention name in systemd. 2014-08-18 22:19:50 +01:00
Jesse Glick
fd372273bd Updated version of contrib/try-all-ns 2014-02-04 20:20:35 +00:00
Simon Kelley
10bd29265b macscript: create file if it doesn't exist. 2013-09-27 21:07:30 +01:00
Simon Kelley
42b44a591b Add contrib/mactable 2013-09-27 14:38:45 +01:00
Simon Kelley
1c10b9de11 Note that dhcp_lease_time and dhcp_release only work for IPv4. 2013-04-23 10:58:35 +01:00
Simon Kelley
aa63a21ce0 Fix regression in dhcp_lease_time utility. 2013-04-22 15:01:52 +01:00
Simon Kelley
04a0612e8a Remove dead code. 2013-02-05 14:47:46 +00:00
Simon Kelley
657ed09693 Add contrib/dbus-test/dbus-test.py 2012-10-12 14:45:55 +01:00
Simon Kelley
24ce681e51 Add instructions/patches for dbus activation to contrib/systemd. 2012-06-04 21:40:11 +01:00
Simon Kelley
a953096485 Send "FTP transfer complete" events to the DHCP lease script. 2012-03-20 22:07:35 +00:00
Simon Kelley
7de060b08d import of dnsmasq-2.58.tar.gz 2012-01-05 17:31:15 +00:00
Simon Kelley
28866e9567 import of dnsmasq-2.56.tar.gz 2012-01-05 17:31:15 +00:00
Simon Kelley
8ef5ada238 import of dnsmasq-2.53.tar.gz 2012-01-05 17:31:15 +00:00
Simon Kelley
316e2730ac import of dnsmasq-2.52.tar.gz 2012-01-05 17:31:15 +00:00
Simon Kelley
7622fc06ab import of dnsmasq-2.48.tar.gz 2012-01-05 17:31:14 +00:00
Simon Kelley
73a08a248d import of dnsmasq-2.47.tar.gz 2012-01-05 17:31:14 +00:00
Simon Kelley
9009d74652 import of dnsmasq-2.46.tar.gz 2012-01-05 17:31:14 +00:00
Simon Kelley
9e038946a1 import of dnsmasq-2.42.tar.gz 2012-01-05 17:31:13 +00:00
Simon Kelley
5aabfc78bc import of dnsmasq-2.40.tar.gz 2012-01-05 17:31:13 +00:00
Simon Kelley
832af0bafb import of dnsmasq-2.36.tar.gz 2012-01-05 17:31:13 +00:00
Simon Kelley
1697269ce7 import of dnsmasq-2.34.tar.gz 2012-01-05 17:31:12 +00:00
Simon Kelley
208b65c5cf import of dnsmasq-2.33.tar.gz 2012-01-05 17:31:12 +00:00
Simon Kelley
b8187c80a8 import of dnsmasq-2.24.tar.gz 2012-01-05 17:31:11 +00:00
Simon Kelley
3d8df260e1 import of dnsmasq-2.23.tar.gz 2012-01-05 17:31:11 +00:00
Simon Kelley
fd9fa4811d import of dnsmasq-2.16.tar.gz 2012-01-05 17:31:11 +00:00
Simon Kelley
feba5c1d25 import of dnsmasq-2.10.tar.gz 2012-01-05 17:31:10 +00:00