summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/reass/ip6_full_reass.c
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2019-03-06 11:59:57 +0100
committerOle Trøan <otroan@employees.org>2019-09-25 16:10:09 +0000
commit769145cdbc28324bd0b6304951199ec3d6e0e883 (patch)
treec424eb8d61ad1fdfea7f2b4bf5253ea6b92fadf4 /src/vnet/ip/reass/ip6_full_reass.c
parent8fadb658a1b91a92f174fcf29a3620b644d8fe21 (diff)
ip: respect buffer boundary when searching for ipv6 headers
Type: fix Change-Id: I5a5461652f8115fa1270e20f748178fb5f5450f2 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vnet/ip/reass/ip6_full_reass.c')
-rw-r--r--src/vnet/ip/reass/ip6_full_reass.c11
1 files changed, 7 insertions, 4 deletions
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)
{