From 668150d2cdb2c25966a4bbd398db85e33c8488a2 Mon Sep 17 00:00:00 2001 From: DmitriyEshenko Date: Tue, 20 Aug 2019 12:56:14 +0300 Subject: Prepared check-ip and for ipoe, migrate to [common]check-ip --- accel-pppd/ppp/ipcp_opt_ipaddr.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'accel-pppd/ppp') diff --git a/accel-pppd/ppp/ipcp_opt_ipaddr.c b/accel-pppd/ppp/ipcp_opt_ipaddr.c index 7bac55b..03eb418 100644 --- a/accel-pppd/ppp/ipcp_opt_ipaddr.c +++ b/accel-pppd/ppp/ipcp_opt_ipaddr.c @@ -171,9 +171,14 @@ static void load_config(void) { const char *opt; - opt = conf_get_opt("ppp", "check-ip"); - if (opt && atoi(opt) >= 0) - conf_check_exists = atoi(opt) > 0; + opt = conf_get_opt("common", "check-ip"); + if (opt && atoi(opt) > 0) + conf_check_exists = atoi(opt); + else { + opt = conf_get_opt("ppp", "check-ip"); + if (opt && atoi(opt) >= 0) + conf_check_exists = atoi(opt) > 0; + } } static void ipaddr_opt_init() -- cgit v1.2.3