From 4fe2291bbdf67251bb42ce742d8d481b901e1d1c Mon Sep 17 00:00:00 2001 From: Yi Yang Date: Thu, 18 Aug 2016 14:06:52 +0800 Subject: [PATCH] Fix vxlan-gpe next protocol value vxlan4_gpe_rewrite and vxlan6_gpe_rewrite used the fixed value VXLAN_GPE_PROTOCOL_IP4 for next protocol regardless of vxlan-gpe port next protocol, this commit fixed it and used the value from vxlan-gpe port. Change-Id: I22ba25fbde1c0630960cbcfd196e14231fbf1af3 Signed-off-by: Yi Yang --- vnet/vnet/vxlan-gpe/vxlan_gpe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnet/vnet/vxlan-gpe/vxlan_gpe.c b/vnet/vnet/vxlan-gpe/vxlan_gpe.c index f54d46c78d4..e032d568c97 100644 --- a/vnet/vnet/vxlan-gpe/vxlan_gpe.c +++ b/vnet/vnet/vxlan-gpe/vxlan_gpe.c @@ -162,7 +162,7 @@ static int vxlan4_gpe_rewrite (vxlan_gpe_tunnel_t * t) /* VXLAN header. Are we having fun yet? */ h0->vxlan.flags = VXLAN_GPE_FLAGS_I | VXLAN_GPE_FLAGS_P; h0->vxlan.ver_res = VXLAN_GPE_VERSION; - h0->vxlan.protocol = VXLAN_GPE_PROTOCOL_IP4; + h0->vxlan.protocol = t->protocol; h0->vxlan.vni_res = clib_host_to_net_u32 (t->vni<<8); t->rewrite = rw; @@ -200,7 +200,7 @@ static int vxlan6_gpe_rewrite (vxlan_gpe_tunnel_t * t) /* VXLAN header. Are we having fun yet? */ h0->vxlan.flags = VXLAN_GPE_FLAGS_I | VXLAN_GPE_FLAGS_P; h0->vxlan.ver_res = VXLAN_GPE_VERSION; - h0->vxlan.protocol = VXLAN_GPE_PROTOCOL_IP4; + h0->vxlan.protocol = t->protocol; h0->vxlan.vni_res = clib_host_to_net_u32 (t->vni<<8); t->rewrite = rw; -- 2.16.6