* 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
* <paulus@samba.org>".
* 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.50 2005/06/26 19:34:41 carlsonj Exp $"
#include <stdlib.h>
#include <string.h>
#include "lcp.h" /* lcp_close(), lcp_fsm */
#endif
-static const char rcsid[] = RCSID;
/*
* Unfortunately there is a bug in zlib which means that using a
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 *));
ccp_options *go = &ccp_gotoptions[f->unit];
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);
* 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;
+ int treat_as_reject;
{
ccp_options *go = &ccp_gotoptions[f->unit];
ccp_options no; /* options we've seen already */
}
} 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 */