From 9176c3c67a70a7451aed2ed444c942d30f600a07 Mon Sep 17 00:00:00 2001 From: Vladislav Grishenko Date: Thu, 29 Aug 2019 17:33:07 +0500 Subject: ppp/ipoe: cleanup cleck-ip support let check-ip setting from [ppp]/[ipoe] sections has prio over [common] for compatibility with older configs. --- accel-pppd/ctrl/ipoe/ipoe.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'accel-pppd/ctrl') diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 9880162c..1316b615 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -3954,8 +3954,10 @@ static void load_config(void) else conf_weight = 0; - opt = conf_get_opt("common", "check-ip"); - if (opt && atoi(opt) >= 0) + opt = conf_get_opt("ipoe", "check-ip"); + if (!opt) + opt = conf_get_opt("common", "check-ip"); + if (opt && opt >= 0) conf_check_exists = atoi(opt) > 0; #ifdef RADIUS -- cgit v1.2.3