I'm not sure, but this appears to be a bug in src/drivers/net/ppp_mppe.c
While reading the MPPE RFC, I learned that the FLUSHED bit shall be set when ENCRYPTED is enabled. Sure enough I found this in ppp_mppe.c:
MPPE_BIT_FLUSHED is conspicuously absent from these lines of code. This is apparently intentional as the comment indicates but goes without further explanation. There may indeed be a good reason for this but I don't know what it could be.Code:/* * Note that even though we have initialized the key table, we don't * set the FLUSHED bit. This is contrary to RFC 3078, sec. 3.1. */ state->bits = MPPE_BIT_ENCRYPTED;
I have fixed this by assuming the reason is valid, and disabled the code that does a sanity check on the FLUSHED bit in stateless mode. I have also confirmed that the tunnel still works correctly after this change.
Remove the following code from the mppe_decompress function body in file ppp_mppe.c:
Now build and install the new module. This process leaves the old module intact in case you want to go back to it. Just change the ppp_mppe.ko symlink to point back to the old module.Code:if (!state->stateful && !flushed) { printk(KERN_DEBUG "mppe_decompress[%d]: FLUSHED bit not set in " "stateless mode!\n", state->unit); state->sanity_errors += 100; sanity = 1; }
I confirmed the fix by writing a 10-megabyte random file locally, copying it across the tunnel using scp, and performing sha1sum on the file at both ends. The hashes matched, so I conclude the tunnel is not dropping or corrupting data.Code:cd /usr/src/$KERNEL/drivers/net mv Makefile Makefile.orig echo 'obj-$(CONFIG_PPP_MPPE) += ppp_mppe.o' > Makefile make -C /lib/modules/2.6.27-17-generic/build M=$(pwd) modules mv Makefile.orig Makefile rmmod ppp_mppe cp ./ppp_mppe.ko /lib/modules/$KERNEL/kernel/drivers/net/ppp_mppe.ko-new cd /lib/modules/$KERNEL/kernel/drivers mv ppp_mppe.ko ppp_mppe.ko-old ln -s ppp_mppe.ko-new ppp_mppe.ko modprobe ppp_mppe



Adv Reply

Bookmarks