aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-03-01 10:22:14 +0100
committerOle Troan <ot@cisco.com>2019-03-01 11:14:59 +0100
commit3d09e9992d198c62dee468e5019bf9dd9c2dffca (patch)
treec40cbfbb46c097f519fa22ee61fa35ecc332ffe1
parentca561dffe1888021d48ad8020fdd8c3b13ff17de (diff)
1810 version of VPP-1573 fix crash in ip6 reassembly
Change-Id: I20d15ee45957e9fb5a7b3e7edd10cd34b308b664 Signed-off-by: Ole Troan <ot@cisco.com>
-rw-r--r--src/vnet/ip/ip6_reassembly.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/vnet/ip/ip6_reassembly.c b/src/vnet/ip/ip6_reassembly.c
index 5d642639551..0162ad98e63 100644
--- a/src/vnet/ip/ip6_reassembly.c
+++ b/src/vnet/ip/ip6_reassembly.c
@@ -712,13 +712,9 @@ ip6_reass_update (vlib_main_t * vm, vlib_node_runtime_t * node,
// starting a new reassembly
ip6_reass_insert_range_in_chain (vm, rm, rt, reass, prev_range_bi,
*bi0);
- if (PREDICT_FALSE (fb->flags & VLIB_BUFFER_IS_TRACED))
- {
- ip6_reass_add_trace (vm, node, rm, reass, *bi0, RANGE_NEW, 0);
- }
reass->min_fragment_length = clib_net_to_host_u16 (fip->payload_length);
- *bi0 = ~0;
- return IP6_REASS_RC_OK;
+ consumed = 1;
+ goto check_if_done_maybe;
}
reass->min_fragment_length =
clib_min (clib_net_to_host_u16 (fip->payload_length),
@@ -767,9 +763,11 @@ ip6_reass_update (vlib_main_t * vm, vlib_node_runtime_t * node,
}
*next0 = IP6_REASSEMBLY_NEXT_DROP;
*error0 = IP6_ERROR_REASS_OVERLAPPING_FRAGMENT;
+ return IP6_REASS_RC_OK;
}
break;
}
+check_if_done_maybe:
if (consumed)
{
if (PREDICT_FALSE (fb->flags & VLIB_BUFFER_IS_TRACED))
@@ -792,7 +790,6 @@ ip6_reass_update (vlib_main_t * vm, vlib_node_runtime_t * node,
else
{
*next0 = IP6_REASSEMBLY_NEXT_DROP;
- ;
*error0 = IP6_ERROR_REASS_DUPLICATE_FRAGMENT;
}
}