Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 627e72f9 authored by Sam Protsenko's avatar Sam Protsenko Committed by Alistair Strachan
Browse files

UPSTREAM: l2tp: Add protocol field decompression



When Protocol Field Compression (PFC) is enabled, the "Protocol" field
in PPP packet will be received without leading 0x00. See section 6.5 in
RFC 1661 for details. So let's decompress protocol field if needed, the
same way it's done in drivers/net/ppp/pptp.c.

In case when "nopcomp" pppd option is not enabled, PFC (pcomp) can be
negotiated during LCP handshake, and L2TP driver in kernel will receive
PPP packets with compressed Protocol field, which in turn leads to next
error:

    Protocol Rejected (unsupported protocol 0x2145)

because instead of Protocol=0x0021 in PPP packet there will be
Protocol=0x21. This patch unwraps it back to 0x0021, which fixes the
issue.

Sending the compressed Protocol field will be implemented in subsequent
patch, this one is self-sufficient.

Signed-off-by: default avatarSam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>

(cherry picked from commit c151acc6e9ffa08972aa20d8bc07a66081922c1e)
Bug: 116424816
Change-Id: I4b5e4ad3962de73561fd500dbcc7ef0db1aa89a2
Signed-off-by: default avatarSam Protsenko <semen.protsenko@linaro.org>
parent 73dc755e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment