Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1906675imu; Sun, 16 Dec 2018 11:37:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/X0E9tdrlO9zWLb7q97FLzLehbgdwVWnziSk0ZwKgcbrQ8SQrpRUO80bYX0ib1S0QaXptj8 X-Received: by 2002:a63:d747:: with SMTP id w7mr9610775pgi.360.1544989057016; Sun, 16 Dec 2018 11:37:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544989056; cv=none; d=google.com; s=arc-20160816; b=VPck1CKY8B7yeK/735vrfK56fsN/C8kL3xc5w4IoRZYcipB4je9RcivY3cgBtFOWm4 rpuLljWJlG0qSJaOivz13aKqlDYdRLpeGDHtfnm1DPR1qpVvmii6HRKAdpR9ebAGD27x 186ihRmLTJLOYMmHK46r6Ftj7UPrSW3Ary8s7Un5DzITglQihQ5EXsRBjIVtmtJnCfdp m0dopFVHqlKEugrCuYGaMfFqMkIDySJe4M94JSXXd3KEB7MT4miEfAzMpmgNlZ0hbKGa MrRv5cSqzhUnKSx1lEQ3pNCMDR7OSx6d5MyX4sMaHD/FEU1EvcH+9ZQfrDj/M8NreVi8 r7/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=NWbvsFDD08eJLZJOswXV5Ght/X3BHj4R0kaUPSv91KA=; b=mbPJ/TXC3T4sTLLJLsZzjG1krw+hRv59L4ogO0KWDS4hQxX+KDj/IoY2n4oqlGeB2Q HHRbs2bB3Yis1e83+d1rO7yEPM00FGmDaHRX+pXLVctqWBU3JivmRl/HSl0bGyNjYDlp asT1yuTGFl4Z6oD+yXSL2lOUYQqEG2Iusmqz3gB77cYyOGJDla+Z6yYqN+fszZ0jVvpi c8T51xCsNC53jhJx2CW7dWIaT0S4WHiV3ha8Xde7nLP1y10GTC9Tx8XAajAv7G5yilFC lLdjCJY6me3OCB0H+teHg8S7DL72GKm/gcrpQGDm5Mkk66uOqgqCUvmLpOM3a36amQNi Ih5w== 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 k22si4886021pgl.29.2018.12.16.11.37.20; Sun, 16 Dec 2018 11:37:36 -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 S1730857AbeLPTdr (ORCPT + 99 others); Sun, 16 Dec 2018 14:33:47 -0500 Received: from zimbra.alphalink.fr ([217.15.80.77]:35569 "EHLO zimbra.alphalink.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730688AbeLPTdr (ORCPT ); Sun, 16 Dec 2018 14:33:47 -0500 Received: from localhost (localhost [127.0.0.1]) by mail-2-cbv2.admin.alphalink.fr (Postfix) with ESMTP id 403DB2B5202D; Sun, 16 Dec 2018 20:33:45 +0100 (CET) Received: from zimbra.alphalink.fr ([127.0.0.1]) by localhost (mail-2-cbv2.admin.alphalink.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id oUn-c8l3N9_9; Sun, 16 Dec 2018 20:33:43 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail-2-cbv2.admin.alphalink.fr (Postfix) with ESMTP id CD2E52B52035; Sun, 16 Dec 2018 20:33:43 +0100 (CET) X-Virus-Scanned: amavisd-new at mail-2-cbv2.admin.alphalink.fr Received: from zimbra.alphalink.fr ([127.0.0.1]) by localhost (mail-2-cbv2.admin.alphalink.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id qFxLihmiS-mT; Sun, 16 Dec 2018 20:33:43 +0100 (CET) Received: from localhost (unknown [82.120.188.200]) by mail-2-cbv2.admin.alphalink.fr (Postfix) with ESMTPSA id 8421A2B5202D; Sun, 16 Dec 2018 20:33:43 +0100 (CET) Date: Sun, 16 Dec 2018 20:33:43 +0100 From: Guillaume Nault To: Sam Protsenko Cc: James Chapman , "David S. Miller" , netdev@vger.kernel.org, Linux Kernel Mailing List Subject: Re: [PATCH 2/2] l2tp: Add Protocol field compression Message-ID: <20181216193319.h5kxzuuo7unalg7u@kdev> References: <20181214211242.9721-1-semen.protsenko@linaro.org> <20181214211242.9721-2-semen.protsenko@linaro.org> <20181216163059.i5nadsfzyvcwa4o6@kdev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 16, 2018 at 08:46:19PM +0200, Sam Protsenko wrote: > Hi Guillaume, > > On Sun, Dec 16, 2018 at 6:30 PM Guillaume Nault wrote: > > > > On Fri, Dec 14, 2018 at 11:12:42PM +0200, Sam Protsenko wrote: > > > When Protocol Field Compression (PFC) is enabled, the "Protocol" field > > > in PPP packet should be transmitted without leading 0x00. See section > > > 6.5 in RFC 1661 for details. Let's compress protocol field if needed, > > > the same way it's done in drivers/net/ppp/pptp.c. > > > > > > To actually enable PFC, one should issue corresponding ioctl to L2TP > > > driver from user-space, like this: > > > > > > ioctl(fd, PPPIOCGFLAGS, &flags); > > > flags |= SC_COMP_PROT; > > > ioctl(fd, PPPIOCSFLAGS, &flags); > > > > > > It can be done e.g. from pppol2tp plugin (pppd), when pcomp option was > > > negotiated with peer. > > > > > > Of course, we don't compress Protocol field when sending LCP packets. As > > > stated in RFC 1661, section 6.5: > > > > > > The Protocol field is never compressed when sending any LCP > > > packet. This rule guarantees unambiguous recognition of LCP > > > packets. > > > > > Again, I'm sorry, but I must oppose this change. Although I'm lacking > > time to keep sanitising L2TP, at least I'd like to avoid making the > > situation worse. > > > > L2TP's uapi is already messy enough. Please don't add non-L2TP features > > there. > > > > Activating PFC should be done on PPP file descriptors, not no L2TP > > sockets. We certainly don't want L2TP to snoop on PPP data, much less > > modify them. > > Makes sense. I thought about this, too, just found that it's done that > way in PPTP code and decided not to be too smart about this. Let me > try and re-work this one. Will send v2 soon. > While at it, be sure to target net-next and to post a cover letter if you have more than one patch in the series. Also, the code will have to be compatible with those layers that already implement PFC using their own API (pptp.c, ppp_async.c, etc.). I haven't looked at MP-PPP for a while, but multi-link might have to be taken into account too. But, for now, fixing the reception part is more important, IMO.