aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/dpo/mpls_label_dpo.c
diff options
context:
space:
mode:
authorRajesh Goel <rajegoel@cisco.com>2019-10-06 13:17:36 +0530
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-10-22 11:15:17 +0000
commitbe2d536f87e996ba0067af0ea5fab6dd45d20822 (patch)
treec8f564fe9283e7addb0895de153a96ceadfe470b /src/vnet/dpo/mpls_label_dpo.c
parentd3b170254bc41495cca90c6bfe77ffb02aaa661a (diff)
mpls: support fragmentation of mpls output packet
Type: fix Signed-off-by: Rajesh Goel <rajegoel@cisco.com> Change-Id: Ie4372c5cf58ab215cdec5ce56f8a994daaba2844 (cherry picked from commit d6f1c9c5141c177a14d011a514e392a9357398fb)
Diffstat (limited to 'src/vnet/dpo/mpls_label_dpo.c')
-rw-r--r--src/vnet/dpo/mpls_label_dpo.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/vnet/dpo/mpls_label_dpo.c b/src/vnet/dpo/mpls_label_dpo.c
index 1074a959310..9d147f98f13 100644
--- a/src/vnet/dpo/mpls_label_dpo.c
+++ b/src/vnet/dpo/mpls_label_dpo.c
@@ -484,6 +484,12 @@ mpls_label_imposition_inline (vlib_main_t * vm,
exp2 = ip_dscp_to_mpls_exp(ip2->tos);
exp3 = ip_dscp_to_mpls_exp(ip3->tos);
}
+
+ /* save the payload proto information in mpls opaque */
+ vnet_buffer(b0)->mpls.pyld_proto = DPO_PROTO_IP4;
+ vnet_buffer(b1)->mpls.pyld_proto = DPO_PROTO_IP4;
+ vnet_buffer(b2)->mpls.pyld_proto = DPO_PROTO_IP4;
+ vnet_buffer(b3)->mpls.pyld_proto = DPO_PROTO_IP4;
}
else if (DPO_PROTO_IP6 == dproto)
{
@@ -518,6 +524,12 @@ mpls_label_imposition_inline (vlib_main_t * vm,
exp3 = ip_dscp_to_mpls_exp(
ip6_traffic_class_network_order(ip3));
}
+
+ /* save the payload proto information in mpls opaque */
+ vnet_buffer(b0)->mpls.pyld_proto = DPO_PROTO_IP6;
+ vnet_buffer(b1)->mpls.pyld_proto = DPO_PROTO_IP6;
+ vnet_buffer(b2)->mpls.pyld_proto = DPO_PROTO_IP6;
+ vnet_buffer(b3)->mpls.pyld_proto = DPO_PROTO_IP6;
}
else
{
@@ -787,6 +799,9 @@ mpls_label_imposition_inline (vlib_main_t * vm,
ttl0 = ip0->ttl;
exp0 = ip_dscp_to_mpls_exp(ip0->tos);
}
+
+ /* save the payload proto information in mpls opaque */
+ vnet_buffer(b0)->mpls.pyld_proto = DPO_PROTO_IP4;
}
else if (DPO_PROTO_IP6 == dproto)
{
@@ -805,6 +820,9 @@ mpls_label_imposition_inline (vlib_main_t * vm,
exp0 = ip_dscp_to_mpls_exp(
ip6_traffic_class_network_order(ip0));
}
+
+ /* save the payload proto information in mpls opaque */
+ vnet_buffer(b0)->mpls.pyld_proto = DPO_PROTO_IP6;
}
else
{