From c49fc8db7230e9e4c59cd5547f5b7354261d166b Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Tue, 24 Mar 2015 21:37:43 +0100 Subject: [PATCH] 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. --- src/netif/ppp/ccp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/netif/ppp/ccp.c b/src/netif/ppp/ccp.c index 60018c12..7ed072d7 100644 --- a/src/netif/ppp/ccp.c +++ b/src/netif/ppp/ccp.c @@ -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);