]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[PPP] pppoe: Fix data clobbering in __pppoe_xmit and return value
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 16 Sep 2007 23:19:50 +0000 (16:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 Sep 2007 23:19:50 +0000 (16:19 -0700)
commitdb7bf6d97c6956b7eb0f22131cb5c37bd41f33c0
tree85aa14dea255e209cd2f85180b47f4f092ec6921
parent31bac44468257986484703cc09da8a9dcae88a36
[PPP] pppoe: Fix data clobbering in __pppoe_xmit and return value

The function __pppoe_xmit modifies the skb data and therefore it needs
to copy and skb data if it's cloned.

In fact, it currently allocates a new skb so that it can return 0 in
case of error without freeing the original skb.  This is totally wrong
because returning zero is meant to indicate congestion whereupon pppoe
is supposed to wake up the upper layer once the congestion subsides.

This makes sense for ppp_async and ppp_sync but is out-of-place for
pppoe.  This patch makes it always return 1 and free the skb.

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