mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 22:32:43 -04:00
Merge ppp changes from 2.3.3 -> 2.3.5. I have spotted some more
problems, which I'll have a go at shortly.
This commit is contained in:
parent
74d14b4cc9
commit
a97a7d9e61
5 changed files with 17 additions and 27 deletions
|
|
@ -69,7 +69,7 @@
|
|||
* Paul Mackerras (paulus@cs.anu.edu.au).
|
||||
*/
|
||||
|
||||
/* $Id: if_ppp.c,v 1.57 1998/05/19 14:04:09 dg Exp $ */
|
||||
/* $Id: if_ppp.c,v 1.58 1998/06/07 17:12:03 dfr Exp $ */
|
||||
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
|
||||
/* from NetBSD: if_ppp.c,v 1.15.2.2 1994/07/28 05:17:58 cgd Exp */
|
||||
|
||||
|
|
@ -183,10 +183,7 @@ static void pppdumpm __P((struct mbuf *m0));
|
|||
*/
|
||||
|
||||
extern struct compressor ppp_bsd_compress;
|
||||
extern struct compressor ppp_deflate;
|
||||
#ifdef CI_BADDEFLATE
|
||||
extern struct compressor ppp_baddeflate;
|
||||
#endif
|
||||
extern struct compressor ppp_deflate, ppp_deflate_draft;
|
||||
|
||||
static struct compressor *ppp_compressors[8] = {
|
||||
#if DO_BSD_COMPRESS && defined(PPP_BSDCOMP)
|
||||
|
|
@ -194,9 +191,7 @@ static struct compressor *ppp_compressors[8] = {
|
|||
#endif
|
||||
#if DO_DEFLATE && defined(PPP_DEFLATE)
|
||||
&ppp_deflate,
|
||||
#ifdef CI_BADDEFLATE
|
||||
&ppp_baddeflate,
|
||||
#endif
|
||||
&ppp_deflate_draft,
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
* OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
|
||||
* OR MODIFICATIONS.
|
||||
*
|
||||
* $Id: ppp_comp.h,v 1.5 1997/08/19 14:10:46 peter Exp $
|
||||
* $Id: ppp_comp.h,v 1.6 1998/03/22 06:51:55 peter Exp $
|
||||
*/
|
||||
|
||||
#ifndef _NET_PPP_COMP_H
|
||||
|
|
@ -142,8 +142,7 @@ struct compressor {
|
|||
* Definitions for Deflate.
|
||||
*/
|
||||
#define CI_DEFLATE 26 /* config option for Deflate */
|
||||
/* XXX ppp-2.3.x ships with CI_DEFLATE == 24, but that's Magnalink!! */
|
||||
#define CI_BADDEFLATE 24 /* config option for Magnalink */
|
||||
#define CI_DEFLATE_DRAFT 24 /* value used in original draft RFC */
|
||||
#define CILEN_DEFLATE 4 /* length of its config option */
|
||||
|
||||
#define DEFLATE_MIN_SIZE 8
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: ppp_deflate.c,v 1.8 1998/03/22 06:51:57 peter Exp $ */
|
||||
/* $Id: ppp_deflate.c,v 1.9 1998/03/25 14:28:28 peter Exp $ */
|
||||
|
||||
/*
|
||||
* ppp_deflate.c - interface the zlib procedures for Deflate compression
|
||||
|
|
@ -97,9 +97,9 @@ struct compressor ppp_deflate = {
|
|||
z_incomp, /* incomp */
|
||||
z_comp_stats, /* decomp_stat */
|
||||
};
|
||||
#ifdef CI_BADDEFLATE
|
||||
struct compressor ppp_baddeflate = {
|
||||
CI_BADDEFLATE, /* compress_proto */
|
||||
|
||||
struct compressor ppp_deflate_draft = {
|
||||
CI_DEFLATE_DRAFT, /* compress_proto */
|
||||
z_comp_alloc, /* comp_alloc */
|
||||
z_comp_free, /* comp_free */
|
||||
z_comp_init, /* comp_init */
|
||||
|
|
@ -114,9 +114,6 @@ struct compressor ppp_baddeflate = {
|
|||
z_incomp, /* incomp */
|
||||
z_comp_stats, /* decomp_stat */
|
||||
};
|
||||
#else
|
||||
#define CI_BADDEFLATE CI_DEFLATE /* reduce #ifdef's, let gcc optimize */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Space allocation and freeing routines for use by zlib routines.
|
||||
|
|
@ -152,7 +149,7 @@ z_comp_alloc(options, opt_len)
|
|||
int w_size;
|
||||
|
||||
if (opt_len != CILEN_DEFLATE
|
||||
|| (options[0] != CI_DEFLATE && options[0] != CI_BADDEFLATE)
|
||||
|| (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT)
|
||||
|| options[1] != CILEN_DEFLATE
|
||||
|| DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL
|
||||
|| options[3] != DEFLATE_CHK_SEQUENCE)
|
||||
|
|
@ -199,7 +196,7 @@ z_comp_init(arg, options, opt_len, unit, hdrlen, debug)
|
|||
struct deflate_state *state = (struct deflate_state *) arg;
|
||||
|
||||
if (opt_len < CILEN_DEFLATE
|
||||
|| (options[0] != CI_DEFLATE && options[0] != CI_BADDEFLATE)
|
||||
|| (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT)
|
||||
|| options[1] != CILEN_DEFLATE
|
||||
|| DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL
|
||||
|| DEFLATE_SIZE(options[2]) != state->w_size
|
||||
|
|
@ -385,7 +382,7 @@ z_decomp_alloc(options, opt_len)
|
|||
int w_size;
|
||||
|
||||
if (opt_len != CILEN_DEFLATE
|
||||
|| (options[0] != CI_DEFLATE && options[0] != CI_BADDEFLATE)
|
||||
|| (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT)
|
||||
|| options[1] != CILEN_DEFLATE
|
||||
|| DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL
|
||||
|| options[3] != DEFLATE_CHK_SEQUENCE)
|
||||
|
|
@ -431,7 +428,7 @@ z_decomp_init(arg, options, opt_len, unit, hdrlen, mru, debug)
|
|||
struct deflate_state *state = (struct deflate_state *) arg;
|
||||
|
||||
if (opt_len < CILEN_DEFLATE
|
||||
|| (options[0] != CI_DEFLATE && options[0] != CI_BADDEFLATE)
|
||||
|| (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT)
|
||||
|| options[1] != CILEN_DEFLATE
|
||||
|| DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL
|
||||
|| DEFLATE_SIZE(options[2]) != state->w_size
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* slcompress.h 8.1 93/06/10 */
|
||||
/*
|
||||
* Definitions for tcp compression routines.
|
||||
*
|
||||
|
|
@ -35,7 +34,7 @@
|
|||
*
|
||||
* Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
|
||||
* - Initial distribution.
|
||||
* $Id: slcompress.h,v 1.11 1997/02/22 09:41:16 peter Exp $
|
||||
* $Id: slcompress.h,v 1.12 1997/08/19 14:10:48 peter Exp $
|
||||
*/
|
||||
|
||||
#ifndef _NET_SLCOMPRESS_H_
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
* - added inflateIncomp and deflateOutputPending
|
||||
* - allow strm->next_out to be NULL, meaning discard the output
|
||||
*
|
||||
* $Id: zlib.c,v 1.5 1998/02/09 06:10:02 eivind Exp $
|
||||
* $Id: zlib.c,v 1.6 1998/03/21 20:56:15 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
@ -1151,12 +1151,12 @@ int deflateCopy (dest, source)
|
|||
return Z_STREAM_ERROR;
|
||||
ss = (deflate_state *) source->state;
|
||||
|
||||
*dest = *source;
|
||||
zmemcpy(dest, source, sizeof(*dest));
|
||||
|
||||
ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
|
||||
if (ds == Z_NULL) return Z_MEM_ERROR;
|
||||
dest->state = (struct internal_state FAR *) ds;
|
||||
*ds = *ss;
|
||||
zmemcpy(ds, ss, sizeof(*ds));
|
||||
ds->strm = dest;
|
||||
|
||||
ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
|
||||
|
|
|
|||
Loading…
Reference in a new issue