summaryrefslogtreecommitdiff
path: root/accel-pptpd/ppp/lcp_opt_pcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pptpd/ppp/lcp_opt_pcomp.c')
-rw-r--r--accel-pptpd/ppp/lcp_opt_pcomp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/accel-pptpd/ppp/lcp_opt_pcomp.c b/accel-pptpd/ppp/lcp_opt_pcomp.c
index 0ff4d11..a1ceb8e 100644
--- a/accel-pptpd/ppp/lcp_opt_pcomp.c
+++ b/accel-pptpd/ppp/lcp_opt_pcomp.c
@@ -19,6 +19,7 @@ struct pcomp_option_t
{
struct lcp_option_t opt;
int pcomp; // 0 - disabled, 1 - enabled, 2 - allow,disabled, 3 - allow,enabled
+ int require;
};
static struct lcp_option_handler_t pcomp_opt_hnd=
@@ -75,6 +76,13 @@ static int pcomp_recv_conf_req(struct ppp_lcp_t *lcp, struct lcp_option_t *opt,
{
struct pcomp_option_t *pcomp_opt=container_of(opt,typeof(*pcomp_opt),opt);
+ if (!ptr) {
+ if (pcomp_opt->require)
+ return LCP_OPT_NAK;
+ pcomp_opt->pcomp=0;
+ return LCP_OPT_ACK;
+ }
+
if (pcomp_opt->pcomp>0)
{
pcomp_opt->pcomp=1;