X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fccp.c;h=1f8fd73868210351499e88b5ae6c992dd1ada61a;hb=bfe93d2ac77c628c15ed7acf07ce6b6ef36f0831;hp=60eceb15d5174defc84297cd5e95f4752113fcc5;hpb=7977da267649fee17261d0d163a12863f3534b57;p=ppp.git diff --git a/pppd/ccp.c b/pppd/ccp.c index 60eceb1..1f8fd73 100644 --- a/pppd/ccp.c +++ b/pppd/ccp.c @@ -28,7 +28,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: ccp.c,v 1.47 2004/11/04 10:02:26 paulus Exp $" +#define RCSID "$Id: ccp.c,v 1.49 2005/03/22 09:53:53 paulus Exp $" #include #include @@ -209,7 +209,7 @@ static void ccp_resetci __P((fsm *)); static int ccp_cilen __P((fsm *)); static void ccp_addci __P((fsm *, u_char *, int *)); static int ccp_ackci __P((fsm *, u_char *, int)); -static int ccp_nakci __P((fsm *, u_char *, int)); +static int ccp_nakci __P((fsm *, u_char *, int, int)); static int ccp_rejci __P((fsm *, u_char *, int)); static int ccp_reqci __P((fsm *, u_char *, int *, int)); static void ccp_up __P((fsm *)); @@ -894,7 +894,7 @@ ccp_ackci(f, p, len) * Returns 1 iff the nak was OK. */ static int -ccp_nakci(f, p, len) +ccp_nakci(f, p, len, treat_as_reject) fsm *f; u_char *p; int len; @@ -1158,8 +1158,11 @@ ccp_reqci(f, p, lenp, dont_nak) } } else { /* Neither are set. */ - newret = CONFREJ; - break; + /* We cannot accept this. */ + newret = CONFNAK; + /* Give the peer our idea of what can be used, + so it can choose and confirm */ + ho->mppe = ao->mppe; } /* rebuild the opts */