aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-l2tp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-l2tp.c')
-rw-r--r--epan/dissectors/packet-l2tp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-l2tp.c b/epan/dissectors/packet-l2tp.c
index 8a4047600c..60bfea8021 100644
--- a/epan/dissectors/packet-l2tp.c
+++ b/epan/dissectors/packet-l2tp.c
@@ -2488,7 +2488,7 @@ dissect_l2tp_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
* as they might not be L2TP packets even though they happen
* to be coming from or going to the L2TP port.
*/
- if (tvb_length(tvb) < 2)
+ if (tvb_captured_length(tvb) < 2)
return 0; /* not enough information to check */
control = tvb_get_ntohs(tvb, 0);
switch (L2TP_VERSION(control)) {
@@ -2540,7 +2540,7 @@ dissect_l2tp_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
/* Call to process l2tp v3 data message */
process_l2tpv3_data_udp(tvb, pinfo, tree, l2tp_conv);
}
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
if (LENGTH_BIT(control)) { /* length field included ? */
@@ -2683,13 +2683,13 @@ dissect_l2tp_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
next_tvb = tvb_new_subset_remaining(tvb, idx);
call_dissector(ppp_hdlc_handle, next_tvb, pinfo, tree);
}
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
if (LENGTH_BIT(control))
process_control_avps(tvb, pinfo, l2tp_tree, idx, length, -1, NULL);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}