aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lldp.c
diff options
context:
space:
mode:
authorJason Cohen <j.cohen@f5.com>2020-02-13 16:13:23 -0600
committerAnders Broman <a.broman58@gmail.com>2020-02-15 11:10:23 +0000
commit9a5bb0705c292987db10c7872c379835ec7b5145 (patch)
treee989a54f5ca17ddd56a021cbb883ba423db6b080 /epan/dissectors/packet-lldp.c
parenta64d926ebf4c558d389355204945e1c0f0e8b02a (diff)
packet-lldp: Report only the consumed octets
Allow unconsumed octets to be passed back to the caller so that possible trailer dissctors can be ran. Bug: 16387 Change-Id: I289b4b077d40581d5d0f884e30c2f882d58fccf1 Reviewed-on: https://code.wireshark.org/review/36097 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Jason Cohen <kryojenik2@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-lldp.c')
-rw-r--r--epan/dissectors/packet-lldp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c
index b4aaaf9038..c224bcbf6c 100644
--- a/epan/dissectors/packet-lldp.c
+++ b/epan/dissectors/packet-lldp.c
@@ -4568,8 +4568,10 @@ dissect_lldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
break;
}
- if (rtnValue < 0)
+ if (rtnValue < 0) {
reachedEnd = TRUE;
+ set_actual_length(tvb, offset + rtnValue);
+ }
else
offset += rtnValue;
}