aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sll.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-03-22 14:15:42 -0700
committerGuy Harris <guy@alum.mit.edu>2018-03-22 21:16:40 +0000
commit1ea82e4ff7a81a3719cc8d6b4cd95fada3abb79b (patch)
treebb5752ff796e3d7fbc9bad05a905f5585f092e56 /epan/dissectors/packet-sll.c
parentc55d15783c619f60f2e072553b90fe801815ea0e (diff)
Don't crash for ERSPAN packets in Linux cooked captures.
Sadly, "cooked" means the GRE header isn't available; the extra data pointer is null, so we can't dereference it. Bug: 14548 Change-Id: I51ae67dcc144b7f5ab3c82dd9adf09b342b29ced Reviewed-on: https://code.wireshark.org/review/26595 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-sll.c')
-rw-r--r--epan/dissectors/packet-sll.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/epan/dissectors/packet-sll.c b/epan/dissectors/packet-sll.c
index cd53c9a467..c5f560df65 100644
--- a/epan/dissectors/packet-sll.c
+++ b/epan/dissectors/packet-sll.c
@@ -347,6 +347,14 @@ dissect_sll(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
} else {
switch (hatype) {
case ARPHRD_IPGRE:
+ /*
+ * XXX - the link-layer header appears to consist
+ * of an IPv4 header followed by a bunch of stuff
+ * that includes the GRE flags and version, but
+ * cooked captures strip the link-layer header,
+ * so we can't provide the flags and version to
+ * the dissector.
+ */
proto_tree_add_uint(fh_tree, &hfi_sll_gretype, tvb, 14, 2,
protocol);
dissector_try_uint(gre_dissector_table,