Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1881163imu; Sun, 16 Dec 2018 10:56:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/WLIOBOaLhXjrI/6iEcdRHTQNPJPAEQBqjRCZgkXhKWu37RxEivlLb9mLgnQwbwumC/18RV X-Received: by 2002:a17:902:6113:: with SMTP id t19mr9784841plj.248.1544986567998; Sun, 16 Dec 2018 10:56:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544986567; cv=none; d=google.com; s=arc-20160816; b=eUi/SmrZd80EgBGnQoxpAK1iY9urM6msSHWTnhdDvusCZqpOGvIsAP5BADa4SBQMch tv5Y+vst5sWblBmIctVZdlwPMHrr4a0ueEgIv5hK3I9A3oEe9ZWi688WR0OU9RtDGxqq pSgcTrPnvlCGGeLj0mlodmX4I3L1yqROb3uXWI+vUNgx7ADJzcfZwiZBwNJ3niv+1iIq aWe91t9vSI5aZEoLKkRR4OpPln0jzB7hLqBzmTerPKTAkX2wKxeEjKPfUiFMRKPzQzIG l4ipbGMXlBRO8ZQ4Bcue+Po70Jj5XK77LQ3cDuzTlAFYJviiQ8oDE4C8yoRNqgpn1amX FY6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xIKzofoqeGTPdDkQGq7dhoEjCUH4up0PCTOnDtQdS5s=; b=hdy0s9+9MnCrfVSHHF/HT8pa2JpJ7/3cnmV1N1DKNzxhcykf+O3gO65DvM6KFWUGOt fbyqhvG3eB7ValfaO0hIUQZywitY179DaAbKir7H0OzDw1Y7WnmdNK1UizpA+rL8HpjV tz5QDu13gKWcgVPXM/19sF2KVvUxH4EeWn99PygPrf501+2UpYhEcv8tUz2xbUoJYKXP 07LYRC7iOu3prDmRBbZsDB91NuDA3IPNbNyYh8+ELF0uDy29ptfiVL9JFY/gCkPh3Bg2 Va+oXJ1kr2RHubPfpOSEcRAFpQi+reh04GG1yE6Iw33OytCcLAmrLjMyM+docCyLpsWY HSXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vax1bIsK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g20si9308564pgh.241.2018.12.16.10.55.52; Sun, 16 Dec 2018 10:56:07 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Vax1bIsK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730768AbeLPSqc (ORCPT + 99 others); Sun, 16 Dec 2018 13:46:32 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40372 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730593AbeLPSqc (ORCPT ); Sun, 16 Dec 2018 13:46:32 -0500 Received: by mail-wr1-f65.google.com with SMTP id p4so10094518wrt.7 for ; Sun, 16 Dec 2018 10:46:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xIKzofoqeGTPdDkQGq7dhoEjCUH4up0PCTOnDtQdS5s=; b=Vax1bIsKfjmR7QT/wusmMeIsgfO0k9dSYApOQUaoNmWdYqsUjSRR0iYeGG2dcSIad6 imYwnZmo6k+7+uE+1IpfyRgXQHlT2fi1c1CUtbYcIHcMqsWY18TmTCvhX5ZCXk7q4uBP DvTJjrhN8vrpHkJoc8AMMZ9h75ISBCA2r679s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xIKzofoqeGTPdDkQGq7dhoEjCUH4up0PCTOnDtQdS5s=; b=uDmrczXql8bLFwaVYsx2A2+FWv2mNUKPMEHD0xpHwQj+jXrzM9JVQX5QfhVQYmlTq9 omgdJb3Ajfi5zdWJvfcIcO4DtxnwUxAG+JdlNuxC5cNv5+Z4mKyT1zd3723EZ7aeqQbj WRSEzJwct5zKnpAqgTY/5up7BXBR5XSJ6b6zkcRnWLM8qZ/3cm5ZGlfotZjikRwXxuYq zqkd1t3BdesnrxmmlLGancXZ971CoMe/1XgmxiXvS0KnT+rfl8E0GaqT9ArXHHZV3hf1 5FhUAJCnvaHc15klSs92IX8hdrbLLmV9CdL9Dyi3Zx6rlp+/CMdepyRcyCNbVZNfse/S kr3A== X-Gm-Message-State: AA+aEWY+YyheFLpHcIxwDMJ5puE3ntiHzIE5Hool4B9vxHqLKRfoQOF5 C/nA2JkX4NobGdtCdVxp45B+YhQ8bML7/7l3tm1z+Q== X-Received: by 2002:a5d:43d0:: with SMTP id v16mr8931700wrr.67.1544985990117; Sun, 16 Dec 2018 10:46:30 -0800 (PST) MIME-Version: 1.0 References: <20181214211242.9721-1-semen.protsenko@linaro.org> <20181214211242.9721-2-semen.protsenko@linaro.org> <20181216163059.i5nadsfzyvcwa4o6@kdev> In-Reply-To: <20181216163059.i5nadsfzyvcwa4o6@kdev> From: Sam Protsenko Date: Sun, 16 Dec 2018 20:46:19 +0200 Message-ID: Subject: Re: [PATCH 2/2] l2tp: Add Protocol field compression To: Guillaume Nault Cc: James Chapman , "David S. Miller" , netdev@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks.