aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ip.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-07-24 01:05:23 -0700
committerGuy Harris <guy@alum.mit.edu>2016-07-24 08:05:57 +0000
commit00961a0df29a4e3b5f0541d48e5888fb13828e7b (patch)
tree058a78b9d188802b311d454d7109aad6fe80738e /epan/dissectors/packet-ip.c
parent523e8c3cc549beacf99f5dbfb7e52c5e34ee85e2 (diff)
Pass the next protocol value to ip_try_dissect() as an argument.
That way, we don't rely on the ws_ip pointer being non-null. Based on changes from Ib73410fd8575ad6c836311bbda87a0580e5640ac. Change-Id: If8c437572c725481ac4148c8095a1a479b4fb0f8 Reviewed-on: https://code.wireshark.org/review/16617 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-ip.c')
-rw-r--r--epan/dissectors/packet-ip.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c
index 63a65b5927..59141f6137 100644
--- a/epan/dissectors/packet-ip.c
+++ b/epan/dissectors/packet-ip.c
@@ -1963,7 +1963,7 @@ static const true_false_string flags_sf_set_evil = {
};
gboolean
-ip_try_dissect(gboolean heur_first, tvbuff_t *tvb, packet_info *pinfo,
+ip_try_dissect(gboolean heur_first, guint nxt, tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, ws_ip *iph)
{
heur_dtbl_entry_t *hdtbl_entry;
@@ -1973,7 +1973,7 @@ ip_try_dissect(gboolean heur_first, tvbuff_t *tvb, packet_info *pinfo,
return TRUE;
}
- if (dissector_try_uint_new(ip_dissector_table, iph->ip_nxt, tvb, pinfo,
+ if (dissector_try_uint_new(ip_dissector_table, nxt, tvb, pinfo,
tree, TRUE, iph)) {
return TRUE;
}
@@ -2436,7 +2436,8 @@ dissect_ip_v4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
even be labeled as an IP frame; ideally, if a frame being dissected
throws an exception, it'll be labeled as a mangled frame of the
type in question. */
- if (!ip_try_dissect(try_heuristic_first, next_tvb, pinfo, parent_tree, iph)) {
+ if (!ip_try_dissect(try_heuristic_first, iph->ip_nxt, next_tvb, pinfo,
+ parent_tree, iph)) {
/* Unknown protocol */
if (update_col_info) {
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (%u)",