[pptp-server] ppp_mppe doesn't support PFC
Santtu Hyrkkö
santtu.hyrkko at hut.fi
Mon Feb 5 11:22:02 CST 2001
The ppp-mppe patch at ftp://ftp.binarix.com/pub/ppp-mppe doesn't
support Protocol-Field-Compression inside incoming MPPE encrypted
frames. Here is a (quite hackish) patch which fixes this. This is
against the kernel 2.4.0 version.
I'm not sure whether this should be included in anything, but this
fixes the problems I was having with my PPTP connection.
--- drivers/net/ppp_mppe.c~ Mon Feb 5 19:08:46 2001
+++ drivers/net/ppp_mppe.c Mon Feb 5 19:12:23 2001
@@ -576,6 +576,7 @@
mppe_synchronize_key(state);
return DECOMP_ERROR;
} else {
+ int retval;
if(!state->stateless && (MPPE_BITS(ibuf) & MPPE_BIT_FLUSHED))
mppe_synchronize_key(state);
mppe_update_count(state);
@@ -583,10 +584,18 @@
/* decrypt - adjust for PPP_HDRLEN + MPPE_OVHD - mru should be OK */
RC4(&(state->RC4_recv_key),isize-6,ibuf+6,obuf);
+ /* Do PFC decompression if necessary */
+ retval = isize - MPPE_OVHD;
+ if(obuf[0] & 0x1) {
+ memmove(obuf + 1, obuf, isize - MPPE_OVHD);
+ obuf[0] = 0;
+ ++retval;
+ }
+
(state->stats).unc_bytes += (isize-MPPE_OVHD);
(state->stats).unc_packets ++;
- return isize-MPPE_OVHD;
+ return retval;
}
}
--
Santtu Hyrkkö
More information about the pptp-server
mailing list