From fbc633f5542be4b0b85963f7dcba9ab143c61d62 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Fri, 18 Mar 2022 13:05:09 +0000 Subject: mpls: Set the MTU field in the frag-needed ICMP when doing MPLS fragmentation Type: fix The reported MTU should include the MPLS label overhead Signed-off-by: Neale Ranns Change-Id: I3df6d2e0b13f49701e187a766a157498dcaafbc0 --- src/vnet/mpls/mpls_output.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/vnet/mpls/mpls_output.c b/src/vnet/mpls/mpls_output.c index faeba748e89..d606360ce9e 100644 --- a/src/vnet/mpls/mpls_output.c +++ b/src/vnet/mpls/mpls_output.c @@ -470,14 +470,13 @@ mpls_frag (vlib_main_t * vm, icmp4_error_set_vnet_buffer ( p0, ICMP4_destination_unreachable, ICMP4_destination_unreachable_fragmentation_needed_and_dont_fragment_set, - vnet_buffer (p0)->ip_frag.mtu); + mtu); next0 = MPLS_FRAG_NEXT_ICMP4_ERROR; } else { - icmp6_error_set_vnet_buffer ( - p0, ICMP6_packet_too_big, 0, - adj0->rewrite_header.max_l3_packet_bytes); + icmp6_error_set_vnet_buffer (p0, ICMP6_packet_too_big, + 0, mtu); next0 = MPLS_FRAG_NEXT_ICMP6_ERROR; } } -- cgit 1.2.3-korg