Fix L2TP oopses.
authorJames Chapman <jchapman@katalix.com>
Tue, 13 Nov 2007 08:01:00 +0000 (00:01 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Nov 2007 17:25:35 +0000 (09:25 -0800)
commit7581142e10c9dd143246a21542361532ba045c49
tree4926bcc6b399f161a9443f4eb641bb78e0cdd0c5
parent08b37aeea7a8d34367d7a88f66d568d57a8ee3a2
Fix L2TP oopses.

changeset 91781004b9c029ee55b7aa9ef950a373ba865dc6 in mainline.

[PPP]: L2TP: Fix oops in transmit and receive paths

Changes made on 18-sep to fix skb handling in the pppol2tp driver
broke the transmit and receive paths. Users are only running into this
now because distros are now using 2.6.23 and I must have messed up
when I tested the change.

For receive, we now do our own calculation of how much to pull from
the skb (variable length L2TP header) rather than using
skb_transport_offset(). Also, if the skb isn't a data packet, it must
be passed back to UDP with skb->data pointing to the UDP header.

For transmit, make sure skb->sk is set up because ip_queue_xmit()
needs it.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/pppol2tp.c