summaryrefslogtreecommitdiff
path: root/datapath
diff options
context:
space:
mode:
authorHaishuang Yan <yanhaishuang@cmss.chinamobile.com>2018-11-05 11:23:53 -0800
committerBen Pfaff <blp@ovn.org>2018-11-05 11:27:44 -0800
commitba787100610543a8a115247eff7fd3e310ef5ae2 (patch)
tree0703155d7dc43e437d9a353e4749dd9f6dc141bb /datapath
parentfe62a88f5eaaaeb45baf08054415cd29c69f38e9 (diff)
downloadopenvswitch-ba787100610543a8a115247eff7fd3e310ef5ae2.tar.gz
erspan: fix error handling for erspan tunnel
Upstream commit: commit 51dc63e3911fbb1f0a7a32da2fe56253e2040ea4 Author: Haishuang Yan<yanhaishuang@cmss.chinamobile.com> Date: Mon Sep 10 22:19:48 2018 +0800 erspan: fix error handling for erspan tunnel 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<u9012063@gmail.com> Signed-off-by: Haishuang Yan<yanhaishuang@cmss.chinamobile.com> Acked-by: William Tu<u9012063@gmail.com> Signed-off-by: David S. Miller<davem@davemloft.net> Fixes: 8e53509c ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Greg Rose <gvrose8192@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'datapath')
-rw-r--r--datapath/linux/compat/ip_gre.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c
index b7322c58e..6ac2dd961 100644
--- a/datapath/linux/compat/ip_gre.c
+++ b/datapath/linux/compat/ip_gre.c
@@ -312,6 +312,9 @@ static int ipgre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *tpi,
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);