summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip6_packet.h
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2022-02-24 16:17:52 +0100
committerNeale Ranns <neale@graphiant.com>2022-03-04 15:57:12 +0000
commit81e74d8e22365166043de40666f324df0533ccef (patch)
treebcf4a58cd835af9254439cef74d86b392eb5ff89 /src/vnet/ip/ip6_packet.h
parent82b7991fc28191fd27611c9c948e4aa29f4ca05a (diff)
ip: fix overflow in ip6_ext_header_walk
ip6_ext_hdr_chain_t->eh is IP6_EXT_HDR_MAX elements. Type: fix Change-Id: I28b8d610d8f5c0c520c8391c37b86e837655ab12 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip6_packet.h')
-rw-r--r--src/vnet/ip/ip6_packet.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/ip/ip6_packet.h b/src/vnet/ip/ip6_packet.h
index b00eac72c04..e71604ce7d3 100644
--- a/src/vnet/ip/ip6_packet.h
+++ b/src/vnet/ip/ip6_packet.h
@@ -652,7 +652,7 @@ ip6_ext_header_walk (vlib_buffer_t *b, ip6_header_t *ip, int find_hdr_type,
i++;
if (last)
break;
- if (i > IP6_EXT_HDR_MAX)
+ if (i >= IP6_EXT_HDR_MAX)
break;
next_header = ip6_ext_next_header_s (next_proto, next_header, max_offset,
&offset, &next_proto, &last);