]>
Commit | Line | Data |
---|---|---|
6644c1c7 MT |
1 | From 2941d3ac898cf84b544e47c9735c5e4111711db1 Mon Sep 17 00:00:00 2001 |
2 | From: Simon Kelley <simon@thekelleys.org.uk> | |
3 | Date: Mon, 2 Feb 2015 22:36:42 +0000 | |
5f206778 | 4 | Subject: [PATCH 45/87] 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 | ||
11 | diff --git a/src/inotify.c b/src/inotify.c | |
12 | index 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 | -- | |
37 | 2.1.0 | |
38 |