summaryrefslogtreecommitdiffhomepage
path: root/src/config.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2013-10-15 23:35:25 +0200
committerSteven Barth <steven@midlink.org>2013-10-15 23:35:25 +0200
commitb61c3f98223a264de219be37720b3bee5f19cf81 (patch)
tree0a32d0c3ea3000b8348810f3f2b4b9919bdc7d1d /src/config.c
parent3d5e419ca3214b9e9f1e183b64be049f139a8235 (diff)
Handle reload mechanism
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index a5bcf26..f6a5327 100644
--- a/src/config.c
+++ b/src/config.c
@@ -488,9 +488,16 @@ static int set_interface(struct uci_section *s)
static volatile int do_reload = false;
+void odhcpd_reload(void)
+{
+ uloop_cancelled = true;
+ do_reload = true;
+}
+
+
static void set_stop(int signal)
{
- uloop_end();
+ uloop_cancelled = true;
do_reload = (signal == SIGHUP);
}
@@ -582,6 +589,7 @@ void odhcpd_run(void)
setup_dhcpv6_interface(i, true);
setup_ndp_interface(i, true);
setup_dhcpv4_interface(i, true);
+ i->inuse = false;
} else {
close_interface(i);
}