]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ip6gre: add erspan v2 to tunnel lookup
authorWilliam Tu <u9012063@gmail.com>
Fri, 9 Mar 2018 15:34:40 +0000 (07:34 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Mar 2018 18:03:56 +0000 (13:03 -0500)
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 <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_gre.c

index 3c353125546d8701febaad95f81bdaa675cd5d7d..83c2fffd40be2c7efc9633077147d177d8b681a0 100644 (file)
@@ -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;