From patchwork Fri Mar 9 15:34:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 883702 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@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=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="koNgVHXz"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zyWfX5bZ7z9sc2 for ; Sat, 10 Mar 2018 02:35:16 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751238AbeCIPfO (ORCPT ); Fri, 9 Mar 2018 10:35:14 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:43060 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751193AbeCIPfN (ORCPT ); Fri, 9 Mar 2018 10:35:13 -0500 Received: by mail-pl0-f68.google.com with SMTP id f23-v6so5414318plr.10 for ; Fri, 09 Mar 2018 07:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=TQWbCd/zBu47M4pxA0nSDLG+y3KVIhV4WpCvE+BiX+g=; b=koNgVHXzwksHfi+VkadASfJD4DCxBYIKGugJLAMtdvHPxShzYT0vgjVLBLrwjCOhkU /LMBvs9T/3gQbhwc4L8ryFBk+RbnNujRRLHhN1RB1Cf4W9apI+JSwrr6QncnXwTRgbNd yjLCJbrCJV8P9yjJ5YHSUvaZ4AZFqtESoyetvpM3MX6Br+3sw+e8xdDMAlolN6f3yUje 975RXiZAJs+yRSwMF+GJCQdJ0dMixhfy0DVJbFddyD21EqRfrWXf0HGhnFFayjIOrVdP RUoO4pJkFCic8ufSntIyuk+2bp/bOg2QITOa1zasbVgdlXuR2tvd4OQ7upCfOE0dD+Es EXJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=TQWbCd/zBu47M4pxA0nSDLG+y3KVIhV4WpCvE+BiX+g=; b=YJu3ULC4clJU3/ZfgUJxlnA6JDJkVa07jFm83HoFd3QHLYtNM8wG/3R961PKHm75U/ +R87D3qdTvJi09IgexWtUFU64QTB6aVquRdGUCIPgxnYdSBMMNGqFmQPG3HpfMf1OSQL 3TY7EGMAdxbQ+ObR6sv9wWI35nAjdSk2H2EzA5tl38ku5AJHT6qCJLC5gsdg0OgHh7GF aLx8xDyQR5Dvj6t/tIi+e7aLu2NXziR14cLu8XB5CRc3xYAv8EMDWLa+hCeYX80uojaQ RMifpsJMnBQMt4KV/YSdfKavAdYesXRali8bSbZe9cY/0WJau4uzrhQcQvohOeWwnzju U8Nw== X-Gm-Message-State: APf1xPDgJqBKsCX4Eb8MO7tEwTu8PYH+3RlVRwkF1GJTdo7aZbxhVnGS UKGzwb2aEk9pZNP7FC54P1E8s+Id X-Google-Smtp-Source: AG47ELsf8TDqEXjyd/1BrTGdh9SGPBEkGhBLzDheDNVkQsQdvC4ZhWIywII8BFcF4B+T1nnA3/dKOQ== X-Received: by 2002:a17:902:aa03:: with SMTP id be3-v6mr26459590plb.211.1520609712344; Fri, 09 Mar 2018 07:35:12 -0800 (PST) Received: from sc9-mailhost3.vmware.com ([24.5.191.4]) by smtp.gmail.com with ESMTPSA id q20sm3283443pgc.84.2018.03.09.07.35.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Mar 2018 07:35:11 -0800 (PST) From: William Tu To: netdev@vger.kernel.org Subject: [PATCH net 1/3] ip6gre: add erspan v2 to tunnel lookup Date: Fri, 9 Mar 2018 07:34:40 -0800 Message-Id: <1520609682-101077-2-git-send-email-u9012063@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520609682-101077-1-git-send-email-u9012063@gmail.com> References: <1520609682-101077-1-git-send-email-u9012063@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The patch adds the erspan v2 proto in ip6gre_tunnel_lookup so the erspan v2 tunnel can be found correctly. Signed-off-by: William Tu --- net/ipv6/ip6_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 18a3dfbd0300..a056c2bb4b9a 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c @@ -126,7 +126,8 @@ static struct ip6_tnl *ip6gre_tunnel_lookup(struct net_device *dev, struct ip6_tnl *t, *cand = NULL; struct ip6gre_net *ign = net_generic(net, ip6gre_net_id); int dev_type = (gre_proto == htons(ETH_P_TEB) || - gre_proto == htons(ETH_P_ERSPAN)) ? + gre_proto == htons(ETH_P_ERSPAN) || + gre_proto == htons(ETH_P_ERSPAN2)) ? ARPHRD_ETHER : ARPHRD_IP6GRE; int score, cand_score = 4;