summaryrefslogtreecommitdiff
path: root/accel-pppd/ppp/ipcp_opt_ipaddr.c
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2013-01-07 20:01:26 +0100
committerKozlov Dmitry <xeb@mail.ru>2013-01-25 00:11:54 +0400
commite7d09a09b377e0b778958d156a3047337aefc6f8 (patch)
treed0ad827b3cd853226a70b7a22806af01b081a66e /accel-pppd/ppp/ipcp_opt_ipaddr.c
parentc82eec497ff2e5338c9e811765ca28e4105fb515 (diff)
downloadaccel-ppp-xebd-e7d09a09b377e0b778958d156a3047337aefc6f8.tar.gz
accel-ppp-xebd-e7d09a09b377e0b778958d156a3047337aefc6f8.zip
Fix boolean options parsing in configuration file
Explicitely interpret zero values when parsing boolean options. This allows to unset boolean parameters such as "verbose" when reloading the configuration. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/ppp/ipcp_opt_ipaddr.c')
-rw-r--r--accel-pppd/ppp/ipcp_opt_ipaddr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/ppp/ipcp_opt_ipaddr.c b/accel-pppd/ppp/ipcp_opt_ipaddr.c
index 44dd3dd..e5246d5 100644
--- a/accel-pppd/ppp/ipcp_opt_ipaddr.c
+++ b/accel-pppd/ppp/ipcp_opt_ipaddr.c
@@ -177,8 +177,8 @@ static void load_config(void)
const char *opt;
opt = conf_get_opt("ppp", "check-ip");
- if (opt && atoi(opt) > 0)
- conf_check_exists = 1;
+ if (opt && atoi(opt) >= 0)
+ conf_check_exists = atoi(opt) > 0;
}
static void ipaddr_opt_init()