Message ID | 20200420231352.50855-1-dsahern@kernel.org |
---|---|
Headers | show
Return-Path: <SRS0=q9/i=6E=vger.kernel.org=netdev-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31651C54FCB for <netdev@archiver.kernel.org>; Mon, 20 Apr 2020 23:13:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 083AC22240 for <netdev@archiver.kernel.org>; Mon, 20 Apr 2020 23:13:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587424436; bh=8HccjXUl6Fdh7KkmrarzhiGqZzQcRKdB5hc5dj/omOM=; h=From:To:Cc:Subject:Date:List-ID:From; b=pXnx+nrhjdUHvQWRJlq7OSPc4UX2ZggbrvlX3BAj3pVBpDWJqCq7INzUcAobbENqQ 8LvBhhi5GmaZMxq6kqdxrKVhPB24/YxZeUldpNTk0cEs3CqyK48RqXXEsA99+5SRWd TDSvHX0kiTLq3h1F7/mQ5rUsrKbwyOAZxRqoN094= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726859AbgDTXNz (ORCPT <rfc822;netdev@archiver.kernel.org>); Mon, 20 Apr 2020 19:13:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:39616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726089AbgDTXNy (ORCPT <rfc822;netdev@vger.kernel.org>); Mon, 20 Apr 2020 19:13:54 -0400 Received: from C02YQ0RWLVCF.internal.digitalocean.com (c-73-181-34-237.hsd1.co.comcast.net [73.181.34.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0293620BED; Mon, 20 Apr 2020 23:13:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587424434; bh=8HccjXUl6Fdh7KkmrarzhiGqZzQcRKdB5hc5dj/omOM=; h=From:To:Cc:Subject:Date:From; b=PBVscYT/lI7lxIFDKayFB5cPcfNag7FlSF2t1IpeSVLNQmRWovC74G6V+67QEMqCf Q9yXY98ekDP1zUIq40dy0ed4DTfGzn7zT8vg3BNfIrjWnO8HgMkQ4QGT3S0fsBfTgZ LnPkBW4fbp3h9iKqupVgvi2VsQ2EUEO8JzJz2EvA= From: David Ahern <dsahern@kernel.org> To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, trev@larock.ca, David Ahern <dsahern@gmail.com> Subject: [PATCH net 0/2] net: Fix looping with vrf, xfrms and qdisc on VRF Date: Mon, 20 Apr 2020 17:13:50 -0600 Message-Id: <20200420231352.50855-1-dsahern@kernel.org> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: <netdev.vger.kernel.org> X-Mailing-List: netdev@vger.kernel.org |
Series |
net: Fix looping with vrf, xfrms and qdisc on VRF
|
expand
|
From: David Ahern <dsahern@gmail.com> Trev reported that use of VRFs with xfrms is looping when a qdisc is added to the VRF device. The combination of xfrm + qdisc is not handled by the VRF driver which lost track that it has already seen the packet. The XFRM_TRANSFORMED flag is used by the netfilter code for a similar purpose, so re-use for VRF. Patch 1 drops the #ifdef around setting the flag in the xfrm output functions. Patch 2 adds a check to the VRF driver for flag; if set the packet has already passed through the VRF driver once and does not need to recirculated a second time. This is a day 1 bug with VRFs; stable wise, I would only take this back to 4.14. I have a set of test cases which I will submit to net-next. David Ahern (2): xfrm: Always set XFRM_TRANSFORMED in xfrm{4,6}_output_finish vrf: Check skb for XFRM_TRANSFORMED flag drivers/net/vrf.c | 6 ++++-- net/ipv4/xfrm4_output.c | 2 -- net/ipv6/xfrm6_output.c | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-)