From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] l2tp: Add protocol field decompression Date: Sat, 15 Dec 2018 23:28:59 -0800 (PST) Message-ID: <20181215.232859.365899686560746192.davem@davemloft.net> References: <20181214175921.6859-1-semen.protsenko@linaro.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: jchapman@katalix.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, g.nault@alphalink.fr To: semen.protsenko@linaro.org Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:35898 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729732AbeLPHcd (ORCPT ); Sun, 16 Dec 2018 02:32:33 -0500 In-Reply-To: <20181214175921.6859-1-semen.protsenko@linaro.org> Sender: netdev-owner@vger.kernel.org List-ID: From: Sam Protsenko Date: Fri, 14 Dec 2018 19:59:21 +0200 > 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: Sam Protsenko Applied, thanks.