aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pw-eth.c
diff options
context:
space:
mode:
authorAnders Broman <a.broman58@gmail.com>2017-01-28 10:29:52 +0000
committerAnders Broman <a.broman58@gmail.com>2017-01-28 10:30:16 +0000
commita949d7887cd60ebfe1d81e1adbab920bb1d288d2 (patch)
treebe7f9f677bb21fd7d3cb092268e06147cb71625d /epan/dissectors/packet-pw-eth.c
parent1bfa581529e8edcaeaf842a87726ad6734d72292 (diff)
Revert "MPLS: relax pw_eth_heuristic and improve 1st nibble logic"
This reverts commit 01ddd93a7296b54a2048de74691984a7e78e4cb9. Change-Id: I90f19fec52d3f1edc63fd00e614173a0154503d4 Reviewed-on: https://code.wireshark.org/review/19820 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-pw-eth.c')
-rw-r--r--epan/dissectors/packet-pw-eth.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/epan/dissectors/packet-pw-eth.c b/epan/dissectors/packet-pw-eth.c
index 58f8f3cb65..2c245331f7 100644
--- a/epan/dissectors/packet-pw-eth.c
+++ b/epan/dissectors/packet-pw-eth.c
@@ -108,32 +108,27 @@ dissect_pw_eth_nocw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
}
/*
- * FF: this function returns 2 if the first 12 bytes in tvb looks like
- * two valid ethernet addresses, 1 if either one of them contains a
- * registered OUI and 0 otherwise.
+ * FF: this function returns TRUE if the first 12 bytes in tvb looks like
+ * two valid ethernet addresses. FALSE otherwise.
*/
-static int
+static gboolean
looks_like_plain_eth(tvbuff_t *tvb _U_)
{
const gchar *manuf_name_da;
const gchar *manuf_name_sa;
if (tvb_reported_length_remaining(tvb, 0) < 14) {
- return 0;
+ return FALSE;
}
manuf_name_da = tvb_get_manuf_name_if_known(tvb, 0);
manuf_name_sa = tvb_get_manuf_name_if_known(tvb, 6);
if (manuf_name_da && manuf_name_sa) {
- return 2;
- }
-
- if (manuf_name_da || manuf_name_sa) {
- return 1;
+ return TRUE;
}
- return 0;
+ return FALSE;
}
static int