From patchwork Fri Jun 15 13:39:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Nault X-Patchwork-Id: 929945 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=alphalink.fr Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 416hRd2NThz9s2L for ; Fri, 15 Jun 2018 23:39:25 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936291AbeFONjU (ORCPT ); Fri, 15 Jun 2018 09:39:20 -0400 Received: from zimbra.alphalink.fr ([217.15.80.77]:43942 "EHLO zimbra.alphalink.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936144AbeFONjS (ORCPT ); Fri, 15 Jun 2018 09:39:18 -0400 Received: from localhost (localhost [127.0.0.1]) by mail-2-cbv2.admin.alphalink.fr (Postfix) with ESMTP id 54B0F2B520AE; Fri, 15 Jun 2018 15:39:17 +0200 (CEST) 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 jMdRmtmg8A9T; Fri, 15 Jun 2018 15:39:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail-2-cbv2.admin.alphalink.fr (Postfix) with ESMTP id 313862B520B2; Fri, 15 Jun 2018 15:39:16 +0200 (CEST) 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 Wn5hhjXaiNQB; Fri, 15 Jun 2018 15:39:16 +0200 (CEST) Received: from c-dev-0.admin.alphalink.fr (94-84-15-217.reverse.alphalink.fr [217.15.84.94]) by mail-2-cbv2.admin.alphalink.fr (Postfix) with ESMTP id 0AE302B520AE; Fri, 15 Jun 2018 15:39:16 +0200 (CEST) Received: by c-dev-0.admin.alphalink.fr (Postfix, from userid 1000) id D5003600AD; Fri, 15 Jun 2018 15:39:15 +0200 (CEST) Date: Fri, 15 Jun 2018 15:39:15 +0200 From: Guillaume Nault To: netdev@vger.kernel.org Cc: James Chapman Subject: [PATCH net 0/2] l2tp: l2tp_ppp must ignore non-PPP sessions Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Mutt-Fcc: =Sent User-Agent: Mutt/1.10.0 (2018-05-17) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The original L2TP code was written for version 2 of the protocol, which could only carry PPP sessions. Then L2TPv3 generalised the protocol so that it could transport different kinds of pseudo-wires. But parts of the l2tp_ppp module still break in presence of non-PPP sessions. Assuming L2TPv2 tunnels can only transport PPP sessions is right, but l2tp_netlink failed to ensure that (fixed in patch 1). When retrieving a session from an arbitrary tunnel, l2tp_ppp needs to filter out non-PPP sessions (last occurrence fixed in patch 2). Guillaume Nault (2): l2tp: reject creation of non-PPP sessions on L2TPv2 tunnels l2tp: filter out non-PPP sessions in pppol2tp_tunnel_ioctl() net/l2tp/l2tp_netlink.c | 6 ++++++ net/l2tp/l2tp_ppp.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-)