aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-02-23 20:44:11 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-02-23 20:44:11 +0000
commit60fd0aaf0bf974c524fccd3576218ba83876ff05 (patch)
tree8499743fbb872e297962952e83f5929b8c581441
parent3eddf57266dacf85308f583e3a7504fe67dd18ef (diff)
From Kip McAtee (bug 3274):
Don't indicate incorrect Payload Length when having trailing FCS. svn path=/trunk/; revision=27528
-rw-r--r--epan/dissectors/packet-pppoe.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/epan/dissectors/packet-pppoe.c b/epan/dissectors/packet-pppoe.c
index ba0cea6208..9ee7c9a6be 100644
--- a/epan/dissectors/packet-pppoe.c
+++ b/epan/dissectors/packet-pppoe.c
@@ -751,13 +751,16 @@ static void dissect_pppoes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* the payload length in the packet, and the amount of
* data following the PPPoE header, as an error.
*/
- if (tvb_reported_length(tvb) > 46 &&
- reported_payload_length != actual_payload_length) {
- proto_item_append_text(ti, " [incorrect, should be %u]",
- actual_payload_length);
- expert_add_info_format(pinfo, ti, PI_MALFORMED,
- PI_WARN, "Possible bad payload length %u != %u",
- reported_payload_length, actual_payload_length);
+ if (tvb_reported_length(tvb) > 46) {
+ /* be forgiving about possible trailing FCS */
+ if ((reported_payload_length != actual_payload_length) &&
+ ((reported_payload_length + 4) != actual_payload_length)) {
+ proto_item_append_text(ti, " [incorrect, should be %u]",
+ actual_payload_length);
+ expert_add_info_format(pinfo, ti, PI_MALFORMED,
+ PI_WARN, "Possible bad payload length %u != %u",
+ reported_payload_length, actual_payload_length);
+ }
}
/*