summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pppd/options.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-03-22 06:57:20 +0000
committerpeter <peter@FreeBSD.org>1998-03-22 06:57:20 +0000
commit108c1ee1936470b173b9dd06d836ef7d304f27aa (patch)
tree3d7d39fbdc546ae43c9cd50547f79657797d59dd /usr.sbin/pppd/options.c
parent47129697379a8b3b8a693c593abc3422a63ed9bf (diff)
downloadFreeBSD-src-108c1ee1936470b173b9dd06d836ef7d304f27aa.zip
FreeBSD-src-108c1ee1936470b173b9dd06d836ef7d304f27aa.tar.gz
ppp-2.3.x ships with a bad compression number for deflate. It uses number
24 (which is magnalink!) rather than the correct (according to the rfc) 26. Initial attempt at a compatability kludge that will negotiate for either but will prefer to use the correct deflate compression type.
Diffstat (limited to 'usr.sbin/pppd/options.c')
-rw-r--r--usr.sbin/pppd/options.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/usr.sbin/pppd/options.c b/usr.sbin/pppd/options.c
index 4c55a77..a148b81 100644
--- a/usr.sbin/pppd/options.c
+++ b/usr.sbin/pppd/options.c
@@ -18,7 +18,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: options.c,v 1.16 1997/10/10 09:28:37 peter Exp $";
+static char rcsid[] = "$Id: options.c,v 1.17 1998/03/22 05:33:03 peter Exp $";
#endif
#include <ctype.h>
@@ -216,6 +216,7 @@ static int setbsdcomp __P((char **));
static int setnobsdcomp __P((char **));
static int setdeflate __P((char **));
static int setnodeflate __P((char **));
+static int setnobaddeflate __P((char **));
static int setdemand __P((char **));
static int setpred1comp __P((char **));
static int setnopred1comp __P((char **));
@@ -370,6 +371,8 @@ static struct cmd {
{"deflate", 1, setdeflate}, /* request Deflate compression */
{"nodeflate", 0, setnodeflate}, /* don't allow Deflate compression */
{"-deflate", 0, setnodeflate}, /* don't allow Deflate compression */
+ {"nobaddeflate", 0, setnobaddeflate}, /* don't allow (wrong) Deflate */
+ {"-baddeflate", 0, setnobaddeflate}, /* don't allow (wrong) Deflate */
{"predictor1", 0, setpred1comp}, /* request Predictor-1 */
{"nopredictor1", 0, setnopred1comp},/* don't allow Predictor-1 */
{"-predictor1", 0, setnopred1comp}, /* don't allow Predictor-1 */
@@ -2220,6 +2223,13 @@ setdeflate(argv)
ccp_allowoptions[0].deflate_size = abits;
} else
ccp_allowoptions[0].deflate = 0;
+
+ /* XXX copy over settings for switch compatability */
+ ccp_wantoptions[0].baddeflate = ccp_wantoptions[0].deflate;
+ ccp_wantoptions[0].baddeflate_size = ccp_wantoptions[0].deflate_size;
+ ccp_allowoptions[0].baddeflate = ccp_allowoptions[0].deflate;
+ ccp_allowoptions[0].baddeflate_size = ccp_allowoptions[0].deflate_size;
+
return 1;
}
@@ -2233,6 +2243,15 @@ setnodeflate(argv)
}
static int
+setnobaddeflate(argv)
+ char **argv;
+{
+ ccp_wantoptions[0].baddeflate = 0;
+ ccp_allowoptions[0].baddeflate = 0;
+ return 1;
+}
+
+static int
setpred1comp(argv)
char **argv;
{
OpenPOWER on IntegriCloud