aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wol.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-10-09 16:20:54 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-10-09 16:20:54 +0000
commit32bc65aa8cb90c7554e1d41b6a2964e15fb1ce41 (patch)
treee60aafe0037dc65f13be1906b34beecc1aaf6b9c /epan/dissectors/packet-wol.c
parent16085e86163164c43823267056624347a0de3a93 (diff)
Try to make more efficient heuristick checks.
svn path=/trunk/; revision=52468
Diffstat (limited to 'epan/dissectors/packet-wol.c')
-rw-r--r--epan/dissectors/packet-wol.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-wol.c b/epan/dissectors/packet-wol.c
index 239edc57b0..44d8b97936 100644
--- a/epan/dissectors/packet-wol.c
+++ b/epan/dissectors/packet-wol.c
@@ -85,9 +85,9 @@ dissect_wol(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
guint len;
gint offset;
- guint8 sync[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
guint8 *mac;
const guint8 *passwd;
+ guint64 qword;
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti;
@@ -114,7 +114,8 @@ dissect_wol(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
* tvb for the synchronization stream. My feeling is that this could be
* quite expensive and seriously hinder Wireshark performance. For now,
* unless we need to change it later, just compare the 1st 6 bytes. */
- if ( tvb_memeql(tvb, 0, sync, 6) != 0 )
+ qword = tvb_get_ntoh48(tvb,0);
+ if(qword != 0xffffffffffff)
return (0);
/* So far so good. Now get the next 6 bytes, which we'll assume is the