PPP, CCP: Fix ccp_cilen returning size if both deflate_correct and deflate_draft are enabled

This fixes a bug returning 4 byte less than necessary for the addci buffer
if both deflate_correct and deflate_draft are enabled.
This commit is contained in:
Sylvain Rochet 2015-03-24 21:37:43 +01:00
parent 93fa268db1
commit c49fc8db72

View File

@ -666,7 +666,8 @@ static int ccp_cilen(fsm *f) {
ccp_options *go = &pcb->ccp_gotoptions;
return (go->bsd_compress? CILEN_BSD_COMPRESS: 0)
+ (go->deflate? CILEN_DEFLATE: 0)
+ (go->deflate && go->deflate_correct? CILEN_DEFLATE: 0)
+ (go->deflate && go->deflate_draft? CILEN_DEFLATE: 0)
+ (go->predictor_1? CILEN_PREDICTOR_1: 0)
+ (go->predictor_2? CILEN_PREDICTOR_2: 0)
+ (go->mppe? CILEN_MPPE: 0);