patch.diff
$ cat doc/pptp/patch.diff
--- linux-2.4.27-mppe-mppc-1.1.patch 2005-09-27 00:00:41.000000000 +0000
+++ linux-2.4.27-mppe-mppc-1.1.patch.orig 2005-09-26 15:24:58.000000000 +0000
@@ -155,7 +155,7 @@
err = 0;
break;
-@@ -1025,17 +1028,39 @@
+@@ -1025,14 +1028,37 @@
case PPP_CCP:
/* peek at outbound CCP frames */
ppp_ccp_peek(ppp, skb, 0);
@@ -178,10 +178,7 @@
/* try to do packet compression */
if ((ppp->xstate & SC_COMP_RUN) && ppp->xc_state != 0
&& proto != PPP_LCP && proto != PPP_CCP) {
- int comp_overhead = (ppp->xcomp->compress_proto == CI_MPPE) ?
- 4 : 0;
-- new_skb = alloc_skb(ppp->dev->mtu + ppp->dev->hard_header_len
-- + comp_overhead,
+- new_skb = alloc_skb(ppp->dev->mtu + ppp->dev->hard_header_len,
- GFP_ATOMIC);
+ int comp_ovhd = 0;
+ /*
@@ -195,10 +192,10 @@
+ comp_ovhd = ((ppp->dev->mtu * 9) / 8) + 1 + LZS_OVHD;
+ new_skb = alloc_skb(ppp->dev->mtu + ppp->dev->hard_header_len
+ + comp_ovhd, GFP_ATOMIC);
- if (new_skb == 0) {
- printk(KERN_ERR "PPP: no memory (comp pkt)\n");
- goto drop;
-@@ -1054,9 +1076,21 @@
+ if (new_skb == 0) {
+ printk(KERN_ERR "PPP: no memory (comp pkt)\n");
+ goto drop;
+@@ -1050,9 +1076,21 @@
skb = new_skb;
skb_put(skb, len);
skb_pull(skb, 2); /* pull off A/C bytes */
@@ -221,7 +218,7 @@
}
}
-@@ -1544,14 +1578,15 @@
+@@ -1540,14 +1578,15 @@
int len;
if (proto == PPP_COMP) {
@@ -239,7 +236,7 @@
if (len < 0) {
/* Pass the compressed frame to pppd as an
error indication. */
-@@ -1577,7 +1612,14 @@
+@@ -1573,7 +1612,14 @@
return skb;
err:
@@ -255,7 +252,7 @@
ppp_receive_error(ppp);
return skb;
}
-@@ -2257,6 +2299,7 @@
+@@ -2253,6 +2299,7 @@
/* Initialize the new ppp unit */
ppp->file.index = unit;
ppp->mru = PPP_MRU;
@@ -1570,7 +1567,7 @@
+ * modification, are permitted provided that the following conditions
+ * are met:
*
-- * $Id: ppp-comp.h,v 1.8 1999/07/23 06:53:40 paulus Exp $
+- * $Id: ppp-comp.h,v 1.6 1997/11/27 06:04:44 paulus Exp $
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
@@ -1600,7 +1597,7 @@
*/
/*
-- * ==FILEVERSION 990623==
+- * ==FILEVERSION 980319==
+ * ==FILEVERSION 20040509==
*
* NOTE TO MAINTAINERS:
@@ -1623,16 +1620,13 @@
/* Update state for an incompressible packet received */
void (*incomp) (void *state, unsigned char *ibuf, int icnt);
-@@ -188,11 +196,20 @@
+@@ -187,6 +195,42 @@
#define DEFLATE_CHK_SEQUENCE 0
/*
-- * Definitions for MPPE.
+ * Definitions for MPPE/MPPC.
- */
-
--#define CI_MPPE 18 /* config. option for MPPE */
--#define CILEN_MPPE 6 /* length of config. option */
++ */
++
+#define CI_MPPE 18 /* config option for MPPE */
+#define CILEN_MPPE 6 /* length of config option */
+
@@ -1644,13 +1638,14 @@
+#define MPPE_56BIT 0x80 /* configuration bit M */
+#define MPPE_128BIT 0x40 /* configuration bit S */
+#define MPPE_MPPC 0x01 /* configuration bit C */
-
- /*
- * Definitions for Stac LZS.
-@@ -201,6 +218,19 @@
- #define CI_LZS 17 /* config option for Stac LZS */- #define CILEN_LZS 5 /* length of config option */
-
++
++/*
++ * Definitions for Stac LZS.
++ */
++
++#define CI_LZS 17 /* config option for Stac LZS */++#define CILEN_LZS 5 /* length of config option */
++
+#define LZS_OVHD 4 /* max. LZS overhead */
+#define LZS_HIST_LEN 2048 /* LZS history size */
+#define LZS_MAX_CCOUNT 0x0FFF /* max. coherency counter value */
@@ -1664,6 +1659,7 @@
+#define LZS_EXT_BIT_FLUSHED 0x80 /* bit A */
+#define LZS_EXT_BIT_COMP 0x20 /* bit C */
+
- /*
++/*
* Definitions for other, as yet unsupported, compression methods.
*/
+