1 --- linux/drivers/net/ppp.c.orig Sun Mar 25 08:31:15 2001
2 +++ linux/drivers/net/ppp.c Tue Mar 19 07:15:40 2002
3 @@ -2468,10 +2468,14 @@
6 struct sk_buff *new_skb;
7 + int new_skb_size = ppp->mtu + PPP_HDRLEN;
10 /* Allocate an skb for the compressed frame. */
11 - new_skb = alloc_skb(ppp->mtu + PPP_HDRLEN, GFP_ATOMIC);
12 + if (ppp->sc_xcomp->compress_proto == CI_MPPE)
13 + /* CCP [must have] reduced MTU by MPPE_PAD. */
14 + new_skb_size += MPPE_PAD;
15 + new_skb = alloc_skb(new_skb_size, GFP_ATOMIC);
16 if (new_skb == NULL) {
17 printk(KERN_ERR "ppp_send_frame: no memory\n");
19 @@ -2489,12 +2493,25 @@
20 skb_put(new_skb, new_count);
24 + } else if (new_count == 0) {
26 * The frame could not be compressed, or it could not
27 * be sent in compressed form because CCP is down.
33 + * MPPE requires that we do not send unencrypted
34 + * frames. The compressor will return -1 if we
35 + * should drop the frame. We cannot simply test
36 + * the compress_proto because MPPE and MPPC share
39 + printk(KERN_ERR "ppp: compressor dropped pkt\n");