From 22cb4c4ff6d0d36b812146ebb1a60c1b2f3beade Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 26 Nov 2015 12:25:43 -0800 Subject: Don't allow the "Ethertype" pseudo-protocol's dissection to be disabled. It's not a real protocol, it's a helper dissector for various protocols, and it makes no sense to disable it; doing so means that the Ethertype field itself isn't disabled, and allowing it to be disabled means that you can't do "Disable All", and manually enable Ethernet, IPv4, IPv6, and TCP to disable dissection of protocols running atop TCP on Ethernet. (See https://ask.wireshark.org/questions/48011/enabled-protocols-negation-of-disabled-proto for an example of somebody who wants to do exactly that.) Change-Id: Ibdd6ef53503de548e14cecc3766040c3a0b101d4 Reviewed-on: https://code.wireshark.org/review/12207 Reviewed-by: Guy Harris (cherry picked from commit 677faf2bd4bf233a7d8243b5c5abccf3111cfc5c) Reviewed-on: https://code.wireshark.org/review/12208 --- epan/dissectors/packet-ethertype.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epan/dissectors/packet-ethertype.c b/epan/dissectors/packet-ethertype.c index 2d899884c5..b714f92900 100644 --- a/epan/dissectors/packet-ethertype.c +++ b/epan/dissectors/packet-ethertype.c @@ -392,6 +392,8 @@ proto_register_ethertype(void) proto_ethertype = proto_register_protocol("Ethertype", "Ethertype", "ethertype"); + /* This isn't a real protocol, so you can't disable its dissection. */ + proto_set_cant_toggle(proto_ethertype); new_register_dissector("ethertype", dissect_ethertype, proto_ethertype); -- cgit v1.2.1