Konstantin Sharlaimov | 1 Jun 2007 12:31
Picon

[PATCH 2.6.21.3] ppp_mppe: account for osize too small errors in mppe_decompress()

Prevent mppe_decompress() from generating "osize too small" errors
when checking for output buffer size. When receiving a packet of mru
size the output buffer for decrypted data is 1 byte too small since
mppe_decompress() tries to account for possible PFC, however later
in code it is assumed no PFC.

Adjusting the check prevented there errors from occurring.

Signed-off-by: Konstantin Sharlaimov <konstantin.sharlaimov <at> gmail.com>
---
--- linux-2.6.21.3/drivers/net/ppp_mppe.c.orig  2007-06-01
20:57:04.000000000 +1100
+++ linux-2.6.21.3/drivers/net/ppp_mppe.c       2007-06-01
21:08:03.000000000 +1100
 <at>  <at>  -493,14 +493,14  <at>  <at>  mppe_decompress(void *arg, unsigned char

        /*
         * Make sure we have enough room to decrypt the packet.
-        * Note that for our test we only subtract 1 byte whereas in
-        * mppe_compress() we added 2 bytes (+MPPE_OVHD);
-        * this is to account for possible PFC.
+        * To account for possible PFC we should only subtract 1
+        * byte whereas in mppe_compress() we added 2 bytes (+MPPE_OVHD);
+        * However, we assume no PFC, thus subtracting 2 bytes.
         */
-       if (osize < isize - MPPE_OVHD - 1) {
+       if (osize < isize - MPPE_OVHD - 2) {
                printk(KERN_DEBUG "mppe_decompress[%d]: osize too small! "
                       "(have: %d need: %d)\n", state->unit,
-                      osize, isize - MPPE_OVHD - 1);
(Continue reading)

Jerald Fitzjerald | 6 Jun 2007 10:52
Picon

Help with PPPoE

Hi.

I'm trying to setup a PPPoE in a Linux-From-Scratch system based on an old SuSE.
Things seem to work, but although i use the options `usepeerdns`
and `defaultroute`, pppd does not update the routing table nor
the resolv.conf.

By looking at resolv.conf it sais:

	# Modified_by:  dhcpcd
	search lan
	nameserver 10.0.0.138

and the fact that the routing table is:

	Kernel IP routing table
	Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
	62.103.129.27   *               255.255.255.255 UH    0      0        0 ppp0
	10.0.0.0        *               255.255.255.0   U     0      0        0 eth0
	link-local      *               255.255.0.0     U     0      0        0 eth0
	loopback        *               255.0.0.0       U     0      0        0 lo
	default         10.0.0.138      0.0.0.0         UG    0      0        0 eth0

I have to suppose that somebody else has setup eth0 to be the default
gateway (maybe it's the distribution's LFS was built upon, ip-up scripts).
ifconfig is:

	eth0      Link encap:Ethernet  HWaddr 00:90:F5:47:77:3B  
	          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
        	  UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
(Continue reading)

James Carlson | 6 Jun 2007 12:53

Re: Help with PPPoE

Jerald Fitzjerald writes:
> I'm trying to setup a PPPoE in a Linux-From-Scratch system based on an old SuSE.
> Things seem to work, but although i use the options `usepeerdns`
> and `defaultroute`, pppd does not update the routing table nor
> the resolv.conf.

Note that pppd writes to /etc/ppp/resolv.conf, not directly to /etc.
If you want to use pppd's DNS information, either create a symlink,
like this:

	ln -s /etc/ppp/resolv.conf /etc/resolv.conf

... or write an /etc/ppp/ip-up script to transfer data as required.

> 	default         10.0.0.138      0.0.0.0         UG    0      0        0 eth0

That existing default route will prevent pppd from installing its own
default route.  Pppd tries not to disrupt the existing routing table.

Either remove that route via eth0 before starting pppd, or find some
other way (such as an active routing protocol) to compute the routes
you need.

> So I kill pppd and say:
> 
> 	route del default
> 
> and re-run pppd:
> This time I have the routing table:

(Continue reading)


Gmane