Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1410702imu; Sat, 15 Dec 2018 23:34:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/XgCGG9M/E7HhcN/1unzfXosWx2UnMfHO3bL6aNucl8VKmjEcgp4h4Ltieh3tmNszqEWXjI X-Received: by 2002:a63:ce08:: with SMTP id y8mr8282087pgf.388.1544945670100; Sat, 15 Dec 2018 23:34:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544945670; cv=none; d=google.com; s=arc-20160816; b=Yt8gAmDz46gcfu8I27909PJSiP6Q6NKt45ZXQLXHJFqChp3bLm08qf/eymT/gCIbL9 51bE0HjyiGLy4MNNkGagcKGwO895LY993Yk3UxBoSyyXPxTg3TboI1gRClRHuYnH1nUe Uects+C94aRucwOuDoulYTVkKyiTYEy0s+zicGRRwV6DV1lRSJMyhwcZPtYRf7LTUZ53 8N8ve8r0nLOiEW5bDllonJkyG5ac2ZSf0fiuyBwVB4668Cdy5glxiSEGg0rCnGUWU7KB iZGHmiytYyWuhk/6qViECug+WrKO4ts6SNRAo3Y5a++AWL0vpJDYfIzdE+99/DDERpuh BEeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=Mtz/748YcBNp3XoJL0pL+p+sAPqrPlckgBBybtLDL2g=; b=Rlzp1u9q1tB7eia6Qh2t9KpZyljMvCshMOOeWzgsmcxMI7s+2NjaYrwEQafQZm9Zqa e6Lem/Bqgh1Xixf4N7oEQrnH/bG9GIRXKJZTsWZcsU9I2RmP4MF1aLmhe8HAyj38QzLx cfHuDBb/9larLoLMaN7uhFwXfL8y1Mxgq5vgK2qvPC+WkVegB49R+w/bd4eW5IlU/URC jMcyBnH7HBraQqezQT+/mZ+/SFyP/a7xdFxGwMHen46zmMegniietiwo0mm6yysyx9yM zLbQyhEVIpOQ6yY5W5EWTB+RxNh+ao0K4n3PDsVEmiY8sJZq4Y47bGxpiPmhxsphsQpe SBaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r197si9233674pfc.116.2018.12.15.23.34.01; Sat, 15 Dec 2018 23:34:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729901AbeLPHce (ORCPT + 99 others); Sun, 16 Dec 2018 02:32:34 -0500 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 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::cf9]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id E204714E908D5; Sat, 15 Dec 2018 23:32:32 -0800 (PST) Date: Sat, 15 Dec 2018 23:28:59 -0800 (PST) Message-Id: <20181215.232859.365899686560746192.davem@davemloft.net> To: semen.protsenko@linaro.org Cc: jchapman@katalix.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, g.nault@alphalink.fr Subject: Re: [PATCH] l2tp: Add protocol field decompression From: David Miller In-Reply-To: <20181214175921.6859-1-semen.protsenko@linaro.org> References: <20181214175921.6859-1-semen.protsenko@linaro.org> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sat, 15 Dec 2018 23:32:33 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.