summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2020-03-02 15:44:51 -0500
committerFlorin Coras <florin.coras@gmail.com>2020-03-09 23:09:25 +0000
commita9df8e40c78a1fa6a321661163c16045c0ff25fb (patch)
tree32cf1985233f4e781246a6ee9f72371299d33c63
parent488e74adf48406441434ba5ea7e03339e9c09751 (diff)
mpls: adjust mpls-frag size to account for mpls header
Type: fix Signed-off-by: John Lo <loj@cisco.com> Change-Id: I0b3042317c58c5a4d64d82b16f62e70f0461e578
-rw-r--r--src/vnet/mpls/mpls_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/mpls/mpls_output.c b/src/vnet/mpls/mpls_output.c
index 5ede22aa410..e69a865863e 100644
--- a/src/vnet/mpls/mpls_output.c
+++ b/src/vnet/mpls/mpls_output.c
@@ -72,7 +72,7 @@ set_mpls_fragmentation(vlib_buffer_t * p0, ip_adjacency_t * adj0)
vlib_buffer_advance (p0, vnet_buffer (p0)->mpls.mpls_hdr_length);
/* IP fragmentation */
- ip_frag_set_vnet_buffer (p0, adj0[0].rewrite_header.max_l3_packet_bytes,
+ ip_frag_set_vnet_buffer (p0, adj0[0].rewrite_header.max_l3_packet_bytes - vnet_buffer (p0)->mpls.mpls_hdr_length,
IP4_FRAG_NEXT_MPLS_OUTPUT,
((vnet_buffer (p0)->mpls.pyld_proto == DPO_PROTO_IP4) ? IP_FRAG_FLAG_IP4_HEADER:IP_FRAG_FLAG_IP6_HEADER));