X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fccp.c;h=1f8fd73868210351499e88b5ae6c992dd1ada61a;hb=43a10279245431ee750f2cff3e5a80e00ad9cd75;hp=bbdaad66490c58da6e17f01fcc7916e517c51f46;hpb=d87ee6cecb06b274114b1af2d04ed7b36bfef6c4;p=ppp.git diff --git a/pppd/ccp.c b/pppd/ccp.c index bbdaad6..1f8fd73 100644 --- a/pppd/ccp.c +++ b/pppd/ccp.c @@ -10,16 +10,11 @@ * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to + * 2. The name(s) of the authors of this software must not be used to * endorse or promote products derived from this software without * prior written permission. * - * 4. Redistributions of any form whatsoever must retain the following + * 3. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Paul Mackerras * ". @@ -33,7 +28,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: ccp.c,v 1.46 2003/05/01 12:30:28 paulus Exp $" +#define RCSID "$Id: ccp.c,v 1.49 2005/03/22 09:53:53 paulus Exp $" #include #include @@ -214,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 *)); @@ -899,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; @@ -1163,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 */