]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[PPP] L2TP: Fix skb handling in pppol2tp_xmit
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 19 Sep 2007 17:46:28 +0000 (10:46 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 20 Sep 2007 19:14:18 +0000 (12:14 -0700)
commitf3d5e3a4155b6f42f6f6f0a2cc95ca0adbabe1af
tree82cf55e9144b5aba570c6a8e240fd1daf6c4a88d
parent7a70e39b6633ad85936b029463134ee2599600f1
[PPP] L2TP: Fix skb handling in pppol2tp_xmit

This patch makes pppol2tp_xmit call skb_cow_head so that we don't modify
cloned skb data.  It also gets rid of skb2 we only need to preserve the
original skb for congestion notification, which is only applicable for
ppp_async and ppp_sync.

The other semantic change made here is the removal of socket accounting
for data tranmitted out of pppol2tp_xmit.  The original code leaked any
existing socket skb accounting.  We could fix this by dropping the
original skb owner.  However, this is undesirable as the packet has not
physically left the host yet.

In fact, all other tunnels in the kernel do not account skb's passing
through to their own socket.  In partciular, ESP over UDP does not do
so and it is the closest tunnel type to PPPoL2TP.  So this patch simply
removes the socket accounting in pppol2tp_xmit.  The accounting still
applies to control packets of course.

I've also added a reminder that the outgoing checksum here doesn't work.
I suppose existing deployments don't actually enable checksums.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/pppol2tp.c