summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2011-01-14 07:06:10 +0300
committerDmitry Kozlov <xeb@mail.ru>2011-01-14 07:06:10 +0300
commitdbe712a13ca62587b6e8a3bf5743655342f76419 (patch)
tree7ec941006e1cc92e7f7896ac16e1c7ebee087a5b
parent472a769d098dbf81644fe76de2885c53839f9071 (diff)
downloadaccel-ppp-dbe712a13ca62587b6e8a3bf5743655342f76419.tar.gz
accel-ppp-dbe712a13ca62587b6e8a3bf5743655342f76419.zip
ppp: reload dns
-rw-r--r--accel-pppd/ppp/ipcp_opt_dns.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/accel-pppd/ppp/ipcp_opt_dns.c b/accel-pppd/ppp/ipcp_opt_dns.c
index c1770922..f488f3ce 100644
--- a/accel-pppd/ppp/ipcp_opt_dns.c
+++ b/accel-pppd/ppp/ipcp_opt_dns.c
@@ -6,6 +6,7 @@
#include "ppp_ipcp.h"
#include "log.h"
#include "ipdb.h"
+#include "events.h"
#include "memdebug.h"
@@ -138,7 +139,7 @@ static void dns2_print(void (*print)(const char *fmt,...),struct ipcp_option_t *
print("<dns2 %s>",inet_ntoa(in));
}
-static void __init dns_opt_init()
+static void load_config(void)
{
char *opt;
@@ -149,7 +150,13 @@ static void __init dns_opt_init()
opt = conf_get_opt("dns", "dns2");
if (opt)
conf_dns2 = inet_addr(opt);
-
+}
+
+static void __init dns_opt_init()
+{
ipcp_option_register(&dns1_opt_hnd);
ipcp_option_register(&dns2_opt_hnd);
+
+ load_config();
+ triton_event_register_handler(EV_CONFIG_RELOAD, (triton_event_func)load_config);
}