From 0325cc5f07ac992414129b4f47ae4aae017dbd2b Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Mon, 27 Sep 2010 20:07:32 +0400 Subject: bug fixes --- accel-pptpd/ppp/lcp_opt_accomp.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'accel-pptpd/ppp/lcp_opt_accomp.c') diff --git a/accel-pptpd/ppp/lcp_opt_accomp.c b/accel-pptpd/ppp/lcp_opt_accomp.c index 8545f9d7..94fa1281 100644 --- a/accel-pptpd/ppp/lcp_opt_accomp.c +++ b/accel-pptpd/ppp/lcp_opt_accomp.c @@ -19,6 +19,7 @@ struct accomp_option_t { struct lcp_option_t opt; int accomp; // 0 - disabled, 1 - enabled, 2 - allow,disabled, 3 - allow,enabled + int require; }; static struct lcp_option_handler_t accomp_opt_hnd= @@ -75,6 +76,13 @@ static int accomp_recv_conf_req(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, { struct accomp_option_t *accomp_opt=container_of(opt,typeof(*accomp_opt),opt); + if (!ptr) { + if (accomp_opt->require) + return LCP_OPT_NAK; + accomp_opt->accomp=0; + return LCP_OPT_ACK; + } + if (accomp_opt->accomp>0) { accomp_opt->accomp=1; -- cgit v1.2.3