aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-eth.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2011-06-29 17:22:18 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2011-06-29 17:22:18 +0000
commit2d99c2dbb4c060a9ccecff9448e3e61ec6358ef4 (patch)
tree25e042581c9b3f14022ff0fd6d38a35fef84a4b9 /epan/dissectors/packet-eth.c
parente27a75ac39cf814b1c98fade68bac71d1a3a4560 (diff)
Although technically not needed, for clarity, explicity catch invalid Ethernet frames, increment the "other" count and return. Previously, code execution would have fallen through to the ETHERNET_II case and capture_ethertype() would have incremented the "other" count.
svn path=/trunk/; revision=37835
Diffstat (limited to 'epan/dissectors/packet-eth.c')
-rw-r--r--epan/dissectors/packet-eth.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/dissectors/packet-eth.c b/epan/dissectors/packet-eth.c
index 8eb737d4be..6c1c720767 100644
--- a/epan/dissectors/packet-eth.c
+++ b/epan/dissectors/packet-eth.c
@@ -172,11 +172,10 @@ capture_eth(const guchar *pd, int offset, int len, packet_counts *ld)
* frame; the dissector for those frames registers itself with
* an ethernet type of ETHERTYPE_UNK.
*/
-#if 0 /* TODO */
if (etype > IEEE_802_3_MAX_LEN && etype < ETHERNET_II_MIN_LEN) {
+ ld->other++;
return;
}
-#endif
if (etype <= IEEE_802_3_MAX_LEN && etype != ETHERTYPE_UNK) {
length = etype;