aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-ipv6.c')
-rw-r--r--epan/dissectors/packet-ipv6.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index d8c9bd2b69..8d992cae36 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -448,31 +448,6 @@ ipv6_build_filter(packet_info *pinfo)
address_to_str(pinfo->pool, &pinfo->net_dst));
}
-/* https://www.iana.org/assignments/ipv6-parameters/ipv6-parameters.xhtml#extension-header */
-static gboolean
-ipv6_exthdr_check(int proto) {
- switch (proto) {
- /* fall through all cases */
- case 0: /* IPv6 Hop-by-Hop Option */
- case 43: /* Routing Header for IPv6 */
- case 44: /* Fragment Header for IPv6 */
- case 50: /* Encapsulating Security Payload */
- case 51: /* Authentication Header */
- case 60: /* Destination Options for IPv6 */
- case 135: /* Mobility Header */
- case 139: /* Host Identity Protocol */
- case 140: /* Shim6 Protocol */
- /* Experimental values ignored because they can collide with
- * other experimental uses not relating to IPv6 parameters */
-/* case 253: */ /* Use for experimentation and testing */
-/* case 254: */ /* Use for experimentation and testing */
- return TRUE;
- default:
- break;
- }
- return FALSE;
-}
-
static const fragment_items ipv6_frag_items = {
&ett_ipv6_fragment,
&ett_ipv6_fragments,
@@ -2398,7 +2373,8 @@ again:
break;
default:
- if (ipv6_exthdr_check(nxt) && !dissector_get_uint_handle(ip_dissector_table, nxt)) {
+ if ((ipv6extprotostr(nxt) != NULL) &&
+ !dissector_get_uint_handle(ip_dissector_table, nxt)) {
advance = dissect_unknown_exthdr(tvb, offset, ipv6_exthdr_tree);
nxt = tvb_get_guint8(tvb, offset);
offset += advance;