]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/dnsmasq/0045-Fixup-dhcp-configs-after-reading-extra-hostfiles-wit.patch
Merge remote-tracking branch 'stevee/core-90-geoip' into next
[ipfire-2.x.git] / src / patches / dnsmasq / 0045-Fixup-dhcp-configs-after-reading-extra-hostfiles-wit.patch
CommitLineData
6644c1c7
MT
1From 2941d3ac898cf84b544e47c9735c5e4111711db1 Mon Sep 17 00:00:00 2001
2From: Simon Kelley <simon@thekelleys.org.uk>
3Date: Mon, 2 Feb 2015 22:36:42 +0000
d54a2ce4 4Subject: [PATCH 45/78] Fixup dhcp-configs after reading extra hostfiles with
6644c1c7
MT
5 inotify.
6
7---
8 src/inotify.c | 14 +++++++++++++-
9 1 file changed, 13 insertions(+), 1 deletion(-)
10
11diff --git a/src/inotify.c b/src/inotify.c
12index 470d6ed99213..6f4cd79e0030 100644
13--- a/src/inotify.c
14+++ b/src/inotify.c
15@@ -194,7 +194,19 @@ int inotify_check(time_t now)
16 strcat(path, in->name);
17
18 if (ah->flags & AH_HOSTS)
19- read_hostsfile(path, ah->index, 0, NULL, 0);
20+ {
21+ read_hostsfile(path, ah->index, 0, NULL, 0);
22+#ifdef HAVE_DHCP
23+ if (daemon->dhcp || daemon->doing_dhcp6)
24+ {
25+ /* Propogate the consequences of loading a new dhcp-host */
26+ dhcp_update_configs(daemon->dhcp_conf);
27+ lease_update_from_configs();
28+ lease_update_file(now);
29+ lease_update_dns(1);
30+ }
31+#endif
32+ }
33 #ifdef HAVE_DHCP
34 else if (ah->flags & AH_DHCP_HST)
35 {
36--
372.1.0
38