From: Yi Yang Date: Thu, 18 Aug 2016 06:06:52 +0000 (+0800) Subject: Fix vxlan-gpe next protocol value X-Git-Tag: v17.01-rc0~284 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F28%2F2428%2F2;p=vpp.git 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 --- 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;