Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2854375imm; Mon, 10 Sep 2018 07:26:40 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaUsgg3qX1oDBxyqDPVUuUjR1TVwMNytnauZ0XiYWbITYXNeAotkocRZ2mO4sN45rsaSILa X-Received: by 2002:a63:e056:: with SMTP id n22-v6mr22644857pgj.205.1536589600621; Mon, 10 Sep 2018 07:26:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536589600; cv=none; d=google.com; s=arc-20160816; b=yAUOU713f6ccWnZeQ/JzQY+I5LjEUH6BLmoVUyXO1oNLvYRraDfzcVTyQkp+FSbWVn Yzp28m8HxFPFHrwsn+2A5sGvfWMHi9BClf+6I66Zycmb7ocuzE/wqB2fWIAWkeU/GoSP AEuk0Fu6r8UzqIG5Ah8NA+uEDnxA1bdQZbpqhBYSA4g7UJzewYL7c5SX2sLjNmDrrd4X 0KLo/PtVsympmSaYJjvLO1KOOAPo8rIx3w+fMUxS2rtZq0RNSesLbyKX8ELzMr/S2QT6 IXrHIfMJq8376yVhal871j0cMDILQoPVEzhNZY/7f0V48P4foe/KGcZARlX5L6z415V3 MAYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=2pDAW9cp6eubKKW+qO/d0loSN9mgFWYUPtPoIrN0SOg=; b=khPX1yTlzO6eQzmsQ9XqaY0tznyCR7MgJCzzVIJ5I4bViqxPFe3oCdD7IVgBG82VK9 CgMPhrTsEArpuOCQIXnqh4KIOAeT2Ra+nZJjGZIbiULFnZovc7UJ0oM2ybcHW0CNj40R HAt/DjKbpKRT66/213P88BHGEJxcg22OPYU7KDBbPezrDwPmEGzbZHmwtcQiMowyG4Qd QDjOzxJJbxmDS55Gh4fc2dspw5dzwL7tNGOnKj8wDUdD0P7ULV00mlq2MoazdfUQSiWs RvmytB/VeTmVfGn2iPyyDN8ucdwP5dJaxCiOFO/WBXdEsIbChUc7JnSirX941zOjVlk8 pxqw== 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 d13-v6si17910725plj.286.2018.09.10.07.25.55; Mon, 10 Sep 2018 07:26:40 -0700 (PDT) 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 S1728622AbeIJTOj (ORCPT + 99 others); Mon, 10 Sep 2018 15:14:39 -0400 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:43621 "EHLO cmccmta3.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727674AbeIJTOj (ORCPT ); Mon, 10 Sep 2018 15:14:39 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.9]) by rmmx-syy-dmz-app09-12009 (RichMail) with SMTP id 2ee95b967d9e735-5f260; Mon, 10 Sep 2018 22:20:15 +0800 (CST) X-RM-TRANSID: 2ee95b967d9e735-5f260 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost (unknown[223.105.0.240]) by rmsmtp-syy-appsvr05-12005 (RichMail) with SMTP id 2ee55b967d9ef60-e6d59; Mon, 10 Sep 2018 22:20:15 +0800 (CST) X-RM-TRANSID: 2ee55b967d9ef60-e6d59 From: Haishuang Yan To: "David S. Miller" , Alexey Kuznetsov Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Haishuang Yan , William Tu Subject: [PATCH 2/2] erspan: fix error handling for erspan tunnel Date: Mon, 10 Sep 2018 22:19:48 +0800 Message-Id: <1536589188-27550-2-git-send-email-yanhaishuang@cmss.chinamobile.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1536589188-27550-1-git-send-email-yanhaishuang@cmss.chinamobile.com> References: <1536589188-27550-1-git-send-email-yanhaishuang@cmss.chinamobile.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When processing icmp unreachable message for erspan tunnel, tunnel id should be erspan_net_id instead of ipgre_net_id. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Cc: William Tu Signed-off-by: Haishuang Yan --- net/ipv4/ip_gre.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 85a714d..8cce0e9 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -178,6 +178,9 @@ static void ipgre_err(struct sk_buff *skb, u32 info, if (tpi->proto == htons(ETH_P_TEB)) itn = net_generic(net, gre_tap_net_id); + else if (tpi->proto == htons(ETH_P_ERSPAN) || + tpi->proto == htons(ETH_P_ERSPAN2)) + itn = net_generic(net, erspan_net_id); else itn = net_generic(net, ipgre_net_id); -- 1.8.3.1