Commit 2de795adb96 (datapath: 64-bit GRE support) introduced a bug
for tunnels with no key. Following patch fixes it by setting tunnel
type to GRE type.

Bugs: 13511
Signed-off-by: Pravin B Shelar <pshe...@nicira.com>
---
 datapath/vport-gre.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/datapath/vport-gre.c b/datapath/vport-gre.c
index 6f406bc..4000c74 100644
--- a/datapath/vport-gre.c
+++ b/datapath/vport-gre.c
@@ -202,8 +202,11 @@ static int parse_header(struct iphdr *iph, __be16 *flags, 
__be64 *tun_id,
                        *tunnel_type = TNL_T_PROTO_GRE;
                }
                *tun_id = key_to_tunnel_id(gre_key, seq);
-       } else
+       } else {
                *tun_id = 0;
+               /* Ignore GRE seq if there is no key present. */
+               *tunnel_type = TNL_T_PROTO_GRE;
+       }
 
        if (greh->flags & GRE_SEQ)
                hdr_len += GRE_HEADER_SECTION;
-- 
1.7.10

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to