summaryrefslogtreecommitdiff
path: root/accel-pptpd/ppp/lcp_opt_accomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pptpd/ppp/lcp_opt_accomp.c')
-rw-r--r--accel-pptpd/ppp/lcp_opt_accomp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/accel-pptpd/ppp/lcp_opt_accomp.c b/accel-pptpd/ppp/lcp_opt_accomp.c
index 8545f9d..94fa128 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;