diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c index 933e2f3..c68e37f 100644 --- a/drivers/net/ppp_async.c +++ b/drivers/net/ppp_async.c @@ -890,6 +890,8 @@ ppp_async_input(struct asyncppp *ap, const unsigned char *buf, ap->rpkt = skb; } if (skb->len == 0) { + int headroom = 0; + /* Try to get the payload 4-byte aligned. * This should match the * PPP_ALLSTATIONS/PPP_UI/compressed tests in @@ -897,7 +899,10 @@ ppp_async_input(struct asyncppp *ap, const unsigned char *buf, * enough chars here to test buf[1] and buf[2]. */ if (buf[0] != PPP_ALLSTATIONS) - skb_reserve(skb, 2 + (buf[0] & 1)); + headroom += 2; + if (buf[0] & 1) + headroom += 1; + skb_reserve(skb, headroom); } if (n > skb_tailroom(skb)) { /* packet overflowed MRU */