From: Xin Long <[email protected]>
Upstream commit:
commit 935a9749a36828af0e8be224a5cd4bc758112c34
Author: Xin Long <[email protected]>
Date: Sun Oct 1 22:00:53 2017 +0800
ip_gre: get key from session_id correctly in erspan_rcv
erspan only uses the first 10 bits of session_id as the key to look
up the tunnel. But in erspan_rcv, it missed 'session_id & ID_MASK'
when getting the key from session_id.
If any other flag is also set in session_id in a packet, it would
fail to find the tunnel due to incorrect key in erspan_rcv.
This patch is to add 'session_id & ID_MASK' there and also remove
the unnecessary variable session_id.
Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN")
Signed-off-by: Xin Long <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Cc: Xin Long <[email protected]>
Signed-off-by: Greg Rose <[email protected]>
---
datapath/linux/compat/ip_gre.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c
index 2377d82..caa6e6c 100644
--- a/datapath/linux/compat/ip_gre.c
+++ b/datapath/linux/compat/ip_gre.c
@@ -195,7 +195,6 @@ static int erspan_rcv(struct sk_buff *skb, struct
tnl_ptk_info *tpi,
struct ip_tunnel *tunnel;
struct erspanhdr *ershdr;
const struct iphdr *iph;
- __be32 session_id;
__be32 index;
int len;
--
1.8.3.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev