]> git.ozlabs.org Git - ppp.git/blobdiff - linux/mppe/linux-2.2.20-pad.patch
Remove old Linux kernel MPPE stuff
[ppp.git] / linux / mppe / linux-2.2.20-pad.patch
diff --git a/linux/mppe/linux-2.2.20-pad.patch b/linux/mppe/linux-2.2.20-pad.patch
deleted file mode 100644 (file)
index 1fe2d13..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
---- linux/drivers/net/ppp.c.orig       Sun Mar 25 08:31:15 2001
-+++ linux/drivers/net/ppp.c    Mon Mar 25 09:27:28 2002
-@@ -2468,10 +2468,14 @@
-           (proto != PPP_LCP)                  &&
-           (proto != PPP_CCP)) {
-               struct sk_buff *new_skb;
-+              int new_skb_size = ppp->mtu + PPP_HDRLEN;
-               int new_count;
-               /* Allocate an skb for the compressed frame. */
--              new_skb = alloc_skb(ppp->mtu + PPP_HDRLEN, GFP_ATOMIC);
-+              if (ppp->sc_xcomp->compress_proto == CI_MPPE)
-+                      /* CCP [must have] reduced MTU by MPPE_PAD. */
-+                      new_skb_size += MPPE_PAD;
-+              new_skb = alloc_skb(new_skb_size, GFP_ATOMIC);
-               if (new_skb == NULL) {
-                       printk(KERN_ERR "ppp_send_frame: no memory\n");
-                       kfree_skb(skb);
-@@ -2482,19 +2486,32 @@
-               /* Compress the frame. */
-               new_count = (*ppp->sc_xcomp->compress)
-                       (ppp->sc_xc_state, data, new_skb->data,
--                       count, ppp->mtu + PPP_HDRLEN);
-+                       count, new_skb_size);
-               /* Did it compress? */
-               if (new_count > 0 && (ppp->flags & SC_CCP_UP)) {
-                       skb_put(new_skb, new_count);
-                       kfree_skb(skb);
-                       skb = new_skb;
--              } else {
-+              } else if (new_count == 0) {
-                       /*
-                        * The frame could not be compressed, or it could not
-                        * be sent in compressed form because CCP is down.
-                        */
-                       kfree_skb(new_skb);
-+              } else {
-+                      /*
-+                       * (new_count < 0)
-+                       * MPPE requires that we do not send unencrypted
-+                       * frames.  The compressor will return -1 if we
-+                       * should drop the frame.  We cannot simply test
-+                       * the compress_proto because MPPE and MPPC share
-+                       * the same number.
-+                       */
-+                      printk(KERN_ERR "ppp: compressor dropped pkt\n");
-+                      kfree_skb(new_skb);
-+                      ppp->xmit_busy = 0;
-+                      return;
-               }
-       }