diff options
author | Kozlov Dmitry <dima@server> | 2010-09-27 20:07:32 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-09-27 20:07:32 +0400 |
commit | 0325cc5f07ac992414129b4f47ae4aae017dbd2b (patch) | |
tree | 52c6d762dd62b347695aa51ab5cf4944e5f7bd9b /accel-pptpd/ppp/lcp_opt_accomp.c | |
parent | 59d9616d73973c529b08578f3596acaa081cd8bf (diff) | |
download | accel-ppp-xebd-0325cc5f07ac992414129b4f47ae4aae017dbd2b.tar.gz accel-ppp-xebd-0325cc5f07ac992414129b4f47ae4aae017dbd2b.zip |
bug fixes
Diffstat (limited to 'accel-pptpd/ppp/lcp_opt_accomp.c')
-rw-r--r-- | accel-pptpd/ppp/lcp_opt_accomp.c | 8 |
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; |