From 769145cdbc28324bd0b6304951199ec3d6e0e883 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Wed, 6 Mar 2019 11:59:57 +0100 Subject: ip: respect buffer boundary when searching for ipv6 headers Type: fix Change-Id: I5a5461652f8115fa1270e20f748178fb5f5450f2 Signed-off-by: Klement Sekera --- src/vnet/ip/reass/ip6_full_reass.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/vnet/ip/reass') diff --git a/src/vnet/ip/reass/ip6_full_reass.c b/src/vnet/ip/reass/ip6_full_reass.c index 7b11e78b40f..ef1014922c5 100644 --- a/src/vnet/ip/reass/ip6_full_reass.c +++ b/src/vnet/ip/reass/ip6_full_reass.c @@ -688,8 +688,9 @@ ip6_full_reass_finalize (vlib_main_t * vm, vlib_node_runtime_t * node, ip6_header_t *ip = vlib_buffer_get_current (first_b); u16 ip6_frag_hdr_offset = first_b_vnb->ip.reass.ip6_frag_hdr_offset; ip6_ext_header_t *prev_hdr; - ip6_ext_header_find_t (ip, prev_hdr, frag_hdr, - IP_PROTOCOL_IPV6_FRAGMENTATION); + frag_hdr = + ip6_ext_header_find (vm, first_b, ip, IP_PROTOCOL_IPV6_FRAGMENTATION, + &prev_hdr); if (prev_hdr) { prev_hdr->next_hdr = frag_hdr->next_hdr; @@ -1040,8 +1041,10 @@ ip6_full_reassembly_inline (vlib_main_t * vm, ip6_ext_header_t *prev_hdr; if (ip6_ext_hdr (ip0->protocol)) { - ip6_ext_header_find_t (ip0, prev_hdr, frag_hdr, - IP_PROTOCOL_IPV6_FRAGMENTATION); + frag_hdr = + ip6_ext_header_find (vm, b0, ip0, + IP_PROTOCOL_IPV6_FRAGMENTATION, + &prev_hdr); } if (!frag_hdr) { -- cgit 1.2.3-korg